stsewd / tree-sitter-rst

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

Issue when Footnote with ` : ` #45

Open Carreau opened 11 months ago

Carreau commented 11 months ago

Maybe same as #20 :

Footnote error

.. [1] Footnote from : this journal

Parses as

document [0, 0] - [4, 0]
  paragraph [0, 0] - [0, 14]
  ERROR [2, 0] - [2, 35]
    label [2, 3] - [2, 6]
    classifier [2, 23] - [2, 35]

Because of the :, spaces are important for the failure.

I believe that's fine in sphinx as this seem to be the standard for citation in SciPy/NumPy

stsewd commented 10 months ago

Yeah, fixing https://github.com/stsewd/tree-sitter-rst/issues/20 should fix all problems related to :