Repository navigation
fix: compare inline image alt text and URLs in no-duplicate-headings - #769
lumirlumir wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
hoanle0126
left a comment
There was a problem hiding this comment.
Checked the rule changes and test cases here. Length-prefixing both the serialized value and alt/url avoids delimiter collisions cleanly, even with crafted text containing brackets or commas, while keeping alt as the reported heading text. Leaving ImageReference for a follow-up makes sense to keep this fix small.
|
Changes LGTM, thanks. Leaving open for another day for others to review. |
Prerequisites checklist
AI acknowledgment
Check all that apply.
What is the purpose of this pull request?
Which language are you using?
commonmark/gfm
What did you do?
What did you expect to happen?
Only line 6 should report
Duplicate heading "Sun" found.because its alt text and URL match line 3.What actually happened?
What changes did you make? (Give an overview)
This PR fixes an issue where image alt text and URLs are not recognized as part of a heading sequence, causing headings to be incorrectly reported as duplicates.
I've updated the logic to correctly recognize alt text and URL sequences.
Related Issues
N/A
Is there anything you'd like reviewers to focus on?
There's also an issue with the
ImageReferencenode. That said, fixing it would require more extensive changes to the logic, so I'll address it in a follow-up PR after this one is merged.Summary by CodeRabbit