8000 fix: heading text appears twice by khiga8 · Pull Request #58 · khiga8/github-a11y · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: heading text appears twice #58

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

Merged
merged 1 commit into from
Feb 24, 2025
Merged

Conversation

khiga8
Copy link
Owner
@khiga8 khiga8 commented Feb 24, 2025

Follow-up to #57

This ensures that heading text isn't annotated twice on a markdown body.

Currently, when this extensions runs on GitHub Issues, heading text is annotated twice.

This happens because:

  • we use .markdown-body to uniquely identify a markdown body. For whatever reason, on GitHub Issues specifically, .markdown-body gets set twice on the same markdown body (on different divs).
  • When we query for .markdown-body and add annotations, we get back 2 .markdown-body for the same comment box. As a result, we end up with double annotations.

This PR adds early return logic.

@khiga8 khiga8 merged commit 79eb19c into main Feb 24, 2025
2 checks passed 6CEF
@khiga8 khiga8 deleted the kh-fix-duplicate-heading-issue branch February 24, 2025 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0