Skip to content
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

Fix HTML injection within markdown #5265

Merged

Conversation

the-mikedavis
Copy link
Member

HTML nodes should be combined injections in the markdown block grammar. When nodes are together the highlighting works properly but when there is markdown content between HTML nodes like in a <details> tag, the highlighting of the closing tag breaks since tree-sitter-html looks for opening and closing tags.

Before After
before after

(See that closing </div> tag on L17.)

HTML nodes should be combined injections in the markdown block
grammar. When nodes are together the highlighting works properly but
when there is markdown content between HTML nodes like in a `<details>`
tag, the highlighting of the closing tag breaks since tree-sitter-html
looks for opening and closing tags.
@the-mikedavis the-mikedavis added C-bug Category: This is a bug S-waiting-on-review Status: Awaiting review from a maintainer. A-language-support Area: Support for programming/text languages labels Dec 22, 2022
@archseer archseer merged commit 7905086 into helix-editor:master Dec 23, 2022
@the-mikedavis the-mikedavis deleted the md-markdown-html-injection branch December 23, 2022 01:55
hadronized pushed a commit to hadronized/helix that referenced this pull request Jan 4, 2023
HTML nodes should be combined injections in the markdown block
grammar. When nodes are together the highlighting works properly but
when there is markdown content between HTML nodes like in a `<details>`
tag, the highlighting of the closing tag breaks since tree-sitter-html
looks for opening and closing tags.
freqmod pushed a commit to freqmod/helix that referenced this pull request Feb 8, 2023
HTML nodes should be combined injections in the markdown block
grammar. When nodes are together the highlighting works properly but
when there is markdown content between HTML nodes like in a `<details>`
tag, the highlighting of the closing tag breaks since tree-sitter-html
looks for opening and closing tags.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages C-bug Category: This is a bug S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants