-
Notifications
You must be signed in to change notification settings - Fork 84
fix: report locations in no-multiple-h1 and require-alt-text
#551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I'm not sure how |
|
Seems that |
|
dmnd/dedent#101, perhaps? |
Yes, looks like that is exactly the same problem. I've just updated the added tests to not use |
JoshuaKGoldberg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍. Leaving open for a second review because this is tricky code unit logic.
lumirlumir
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks. Good catch!
Prerequisites checklist
What is the purpose of this pull request?
Fixes report location in the
no-multiple-h1andrequire-alt-textrules in cases where a preceding HTML comment has characters consisting of Unicode surrogate pairs.What changes did you make? (Give an overview)
Updated
utils.stripHtmlCommentsto replace each code unit (instead of code point) with a space. This preserves offsets and locations of characters outside HTML comments.Related Issues
Is there anything you'd like reviewers to focus on?