Skip to content

bug: dollar sign inside markdown hyperlinks #206

@tunaflsh

Description

@tunaflsh

Did you check existing issues?

  • I have read all the tree-sitter docs if it relates to using the parser
  • I have searched the existing issues

Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)

No response

Describe the bug

Dollar sign inside markdown hyperlinks are picked up as inline latex.
See MeanderingProgrammer/render-markdown.nvim#524

Steps To Reproduce/Bad Parse Tree

[$NVIM_APPNAME](https://neovim.io/doc/user/starting.html#$NVIM_APPNAME)

Parse Tree:

(document ; [0, 0] - [1, 0]
  (section ; [0, 0] - [1, 0]
    (paragraph ; [0, 0] - [1, 0]
      (inline ; [0, 0] - [0, 71]
        (inline ; [0, 0] - [0, 71]
          (latex_block ; [0, 1] - [0, 58]
            (latex_span_delimiter) ; [0, 1] - [0, 2]
            (latex_span_delimiter))))))) ; [0, 57] - [0, 58]

Expected Behavior/Parse Tree

(document ; [0, 0] - [1, 0]
  (section ; [0, 0] - [1, 0]
    (paragraph ; [0, 0] - [1, 0]
      (inline ; [0, 0] - [0, 71]
        (inline ; [0, 0] - [0, 71]
          (inline_link ; [0, 0] - [0, 71]
            (link_text) ; [0, 1] - [0, 14]
            (link_destination))))))) ; [0, 16] - [0, 70]

Repro

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions