Closed monaqa closed 9 months ago
I found the bug and fixed it.
Explanation:
Plain text square brackets, as they have an effect on the semantic:
#strong[Hello [] World]
#strong[Hello ] World]
They are considered as containers, and as they do not effect the indentation, no indentation level is pushed on the indentation stack. But when the ]
was encountered, the indentation stack was pop of one level. I removed this pop.
I tried ecf8596 it in my environment and confirmed that the problem has been resolved. Thank you for your quick response and fix!
In text mode, if a list is written after a square bracket without escaping, an unreachable error is displayed during parsing. The list does not have to be immediately after the square bracket, and it seems to reproduce even when placed across paragraphs and apart.
Example code:
Result:
Since installing tree-sitter-typst, my Typst environment has become much more comfortable. Thank you so much!