fix: handle Markdown indented code blocks in rule 17#178
fix: handle Markdown indented code blocks in rule 17#178LarytheLord wants to merge 2 commits intocanonical:mainfrom
Conversation
|
Pushed follow-up commit Root cause was fixture/expectation mismatch for Markdown indented code blocks after the parser change: actual Vale match includes a trailing newline, while the two Fix:
Local validation:
|
|
Thanks for the PR! I don't have a lot of time to look at this in detail today. One thing is that this won't actually fully close #176 - mostly because I wasn't specific enough in the description - but indenting a ``` delimited codeblock would not be solved by this. However, this does look like a solid solution for BlockCode syntax at a glance. |
|
Thanks for the review and totally agreed. You’re right this does not fully close #176 as currently written; I’ve updated the PR description to mark this as a partial fix scoped to BlockCode (indented code block syntax), and explicitly called out the remaining fenced+indented Markdown case as out of scope here. If you want, I can open a focused follow-up PR for that remaining case after this one. |
|
If you are interested that would be fantastic, but I don't think it would be a common use case - so I view it as relatively low priority at the moment :) |
|
That makes sense, thanks. I’ll keep this PR scoped as-is and won’t open the follow-up unless priorities change. |
Summary
Fix Rule 17 to also detect long Markdown indented code blocks (4-space style), not just fenced/directive variants.
Changes
017a-Suggest-code-over-25-lines017b-Warn-code-over-35-linestests/data/manifest.yml:long-code-suggestion-md-indentedlong-code-warning-md-indentedValidation
cd tests && make run51 passedPartially addresses #176 (BlockCode coverage); fenced code blocks that are indented in Markdown are still out of scope for this PR.