tree-sitter-grammars / tree-sitter-markdown

Markdown grammar for tree-sitter
MIT License
411 stars 52 forks source link

Inline code that starts with $ not identified as code. #95

Closed artfulrobot closed 10 months ago

artfulrobot commented 1 year ago

Code inside ` quotes is not picked up as code if the first character is a $.

I have markdown_inline installed.

Code example


This is properly `identified` whereas this is `$not`.

Expected behavior

The $not should be highlighted.

Actual behavior

screenshot showing as described

Note also:

  1. All inline code spans after an inline code span beginning with a $ are wrongly identified.
  2. A work-around is ` <space> $ but this fails after (1)
isaksamsten commented 1 year ago

This also applies to ~.

I suppose they somehow conflict with ~strikethrough~ and $\LaTeX$. I would gladly submit a patch if I could somehow figure out how it works 💀

amaanq commented 10 months ago

Seems to be fine now, let me know if not