stsewd / tree-sitter-rst

reStructuredText grammar for tree-sitter
https://stsewd.dev/tree-sitter-rst/
MIT License
50 stars 7 forks source link

Bullet lists with colon in the line #16

Open Carreau opened 2 years ago

Carreau commented 2 years ago

This: triggers and error

Bullet list with colon, it can be a be or c with 

  * a for example has colon here : <-
  * b : but earlier

While it appears to be properly parsed by sphinx/docutils "active_mask" paramter.

I see why it's ambiguous, and can be seen as as definition list, so unsure if it's fixable.

stsewd commented 2 years ago

Thanks for reporting. I was able to reproduce with a minimal example

a : b
document [0, 0] - [1, 0]
  ERROR [0, 0] - [0, 5]
    classifier [0, 4] - [0, 5]

it's trying to parse it as a definition list, but as the body is missing it errors, but that's a valid paragraph. I'll see if I can fix this in the following weeks.

Carreau commented 2 years ago

Thanks for the quick response.

It is not pressing on my end, I just happened to come across this error and thought I might as well open an issue.

Much appreciation for your work on tree-sitter-rst.