fix(markdown_parser): reject link reference definition with trailing text after destination#9780
Conversation
…text after destination Stop the bare-destination loop in skip_destination_tokens at the first whitespace boundary when followed by non-title text. Previously the loop absorbed spaces and continued, treating `[label]: /url invalid` as a valid definition with destination `/url invalid`.
|
Merging this PR will not alter performance
Comparing Footnotes
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
WalkthroughThe markdown parser's Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Note
This PR was created with AI assistance (Claude Code).
Summary
The bare-destination loop in
skip_destination_tokenscontinued past whitespace into non-title text, treating[label]: /url invalidas a valid link reference definition with destination/url invalid. Now the loop stops at the first whitespace boundary when followed by non-title content, correctly rejecting the line as a definition per CommonMark §4.7.Test Plan
just test-crate biome_markdown_parser— 78 passedjust test-markdown-conformance— 652/652just fjust lDocs
N/A.