ikatyang / tree-sitter-markdown

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

Distinguish heading level tokens #20

Closed ikatyang closed 3 years ago

ikatyang commented 3 years ago

The actual ATX heading markers (#, ##, etc.) are not queryable now, we should expose them as anonymous nodes so that it could be queried.

Similar to what I did in ikatyang/tree-sitter-yaml#9.

ikatyang commented 3 years ago

After second thought, I'm going to distinguish heading level tokens instead of expose literal aliases since literal aliases can only be applied to ATX heading markers but not Setext heading underlines.