You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The current Typst language support is a regex-based character-by-character text builder. Since Typst allows scripting within math mode and markup mode, it makes it difficult to parse and annotate with only a regex-based parser.
For a large Typst document, it is usual that the program fails to parse at the middle of the document because some markup/code/math transitions are not well-detected, causing an weird and funny output.
Describe the solution you'd like
I think I can write a simple recursive descent parser so that nested markup/code/math transitions are correctly parsed. Since this doesn't involve building an abstract syntax tree, but separating only markup and text, I think it is not difficult to implement one.
Describe alternatives you've considered
I tried to enhance the current regex-based parser for my large document, but failed due to the complexity of markup/code/math transitions.
Additional context
Is such a PR welcome?
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The current Typst language support is a regex-based character-by-character text builder. Since Typst allows scripting within math mode and markup mode, it makes it difficult to parse and annotate with only a regex-based parser.
For a large Typst document, it is usual that the program fails to parse at the middle of the document because some markup/code/math transitions are not well-detected, causing an weird and funny output.
Describe the solution you'd like
I think I can write a simple recursive descent parser so that nested markup/code/math transitions are correctly parsed. Since this doesn't involve building an abstract syntax tree, but separating only markup and text, I think it is not difficult to implement one.
Describe alternatives you've considered
I tried to enhance the current regex-based parser for my large document, but failed due to the complexity of markup/code/math transitions.
Additional context
Is such a PR welcome?
The text was updated successfully, but these errors were encountered: