fix: remove Vale BlockIgnores that broke code block scoping - #2839
Open
honzajavorek wants to merge 1 commit into
Open
fix: remove Vale BlockIgnores that broke code block scoping#2839honzajavorek wants to merge 1 commit into
honzajavorek wants to merge 1 commit into
Conversation
Vale already skips fenced code blocks and HTML comments natively when parsing Markdown, so this BlockIgnores line was redundant. Worse, it was actively harmful: because BlockIgnores blanks out matched regions before the Markdown parser sees them, the naive `(?s)(```.*?```)` pattern desynchronized Vale's position mapping. The result was both phantom alerts inside code blocks and real alerts being dropped. Reproduced on sources/academy/tutorials/apify_scrapers/cheerio_scraper.md, where a probe rule reported a hit at 146:15 - inside the fenced block spanning lines 133-153 - while a genuine hit at 156:11 disappeared. Across sources/academy and sources/platform at suggestion level, removing the line drops 247 misplaced alerts and surfaces 378 previously masked ones. This affected every rule, not one in particular. At the error level that CI enforces, the result is unchanged (10 errors before and after), so this is behavior-neutral for the pipeline today and a correctness fix for local runs and any stricter rules added later. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
✅ Preview for this PR (commit |
honzajavorek
marked this pull request as ready for review
July 31, 2026 15:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Vale skips fenced code blocks and HTML comments natively when parsing Markdown, so this BlockIgnores line is (now?) redundant. Because BlockIgnores blanks out matched regions before the Markdown parser sees them, the naive
(?s)(```.*?```)pattern desynchronizes Vale's position mapping.The result is both phantom alerts inside code blocks and real alerts being dropped. Reproduced on
sources/academy/tutorials/apify_scrapers/cheerio_scraper.md, where a probe rule reported a hit at 146:15 - inside the fenced block spanning lines 133-153 - while a genuine hit at 156:11 disappeared. Across sources/academy and sources/platform at suggestion level, removing the line drops 247 misplaced alerts and surfaces 378 previously masked ones.
This affects every rule, not one in particular. At the error level that CI enforces, the result is unchanged (10 errors before and after), so this is behavior-neutral for the pipeline today and a correctness fix for local runs and any stricter rules added later.