ikatyang / tree-sitter-markdown

Markdown grammar for tree-sitter
https://ikatyang.github.io/tree-sitter-markdown
MIT License
183 stars 29 forks source link

Code span should take precedence over html tags #52

Open horriblename opened 2 years ago

horriblename commented 2 years ago

If there are 2 (or more) html tags within code spans, the html tags take precedence over the code span.

image

Tree structure of the above sentence from TSPlayground:

paragraph [0, 0] - [1, 0]
  inline [0, 0] - [0, 39]
    html_tag [0, 10] - [0, 16]
    code_span [0, 16] - [0, 31]
      code_span_delimiter [0, 16] - [0, 17]
      code_span_delimiter [0, 30] - [0, 31]
    html_tag [0, 31] - [0, 38]