tree-sitter-grammars / tree-sitter-markdown

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

Additional parameters in info string break injection. #14

Closed MDeiml closed 2 years ago

MDeiml commented 2 years ago

For example as in this example from the specs

~~~~    ruby startline=3 $%@#$
def foo(x)
  return 3
end
~~~~~~~

Only the first word of the info string should be treated as a language. To solve this we probably need to add a new node so the output looks like


(fenced_code_block
  (info_string
    (language))
  (fenced_code_block_content))
MDeiml commented 2 years ago

Fixed in https://github.com/nvim-treesitter/nvim-treesitter/pull/2125