tree-sitter-grammars / tree-sitter-markdown

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

Nested list item parsed as indented code block when the uncle list item has a fenced code block #116

Closed tomtomjhj closed 11 months ago

tomtomjhj commented 1 year ago

Describe the bug Nested list item is parsed as indented code block when the uncle list item has a fenced code block.

Code example

* a
    * b
      ```
      c
      ```
    * d
        * e

Expected behavior

The list item * e should be parsed as list_item.

Actual behavior It is parsed as indented_code_block.

image

In the following examples, * e is parsed as list_item as expected.

* a
    * b
    * d
        * e
* b
  ```
  c
  ```
* d
    * e

Environment:

MDeiml commented 11 months ago

Fixed it, thanks!