Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Escaped \$ counts as end of latex block #148

Open
2 tasks done
ribru17 opened this issue May 15, 2024 · 0 comments
Open
2 tasks done

bug: Escaped \$ counts as end of latex block #148

ribru17 opened this issue May 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ribru17
Copy link

ribru17 commented May 15, 2024

Did you check existing issues?

  • I have read all the tree-sitter docs if it relates to using the parser
  • I have searched the existing issues

Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)

tree-sitter 0.22.5

Describe the bug

Basically, escaped latex dollar signs are counted as ending delimiters, so it is basically impossible to have a regular dollar sign inside of an inline-equation latex block.

Steps To Reproduce/Bad Parse Tree

(inline [0, 0] - [1, 0]
  (latex_block [0, 0] - [0, 8]
    (latex_span_delimiter [0, 0] - [0, 1])
    (latex_span_delimiter [0, 7] - [0, 8])))

Expected Behavior/Parse Tree

(inline [0, 0] - [1, 0]
  (latex_block [0, 0] - [0, 14]
    (latex_span_delimiter [0, 0] - [0, 1])
    (latex_span_delimiter [0, 13] - [0, 14])))

Repro

$hello\$there$

(and then tree-sitter parse)

@ribru17 ribru17 added the bug Something isn't working label May 15, 2024
@ribru17 ribru17 changed the title bug: Escaped \$ counted as end of latex block bug: Escaped \$ counts as end of latex block May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant