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

Nodes for math mode (mathjax) #37

Open
IndianBoy42 opened this issue Sep 7, 2021 · 2 comments
Open

Nodes for math mode (mathjax) #37

IndianBoy42 opened this issue Sep 7, 2021 · 2 comments

Comments

@IndianBoy42
Copy link

Would it be possible to extend the parser to find mathjax expressions ($blah$ $$blah$$) so that we can use that in queries?

@MageJohn
Copy link

I'd love to see this! I have a feeling though that it shouldn't get added here, as the goal of this project is to conform to a published spec. MathJax expressions like that are a syntax extension to Github Flavoured Markdown.

That said, syntax extensions to Markdown are widely used, so having some support for them would be great. Perhaps the way to do it would be to support some kind of extension or plugin system for the grammar.

@ikatyang, do you think something like that might be possible? I don't know much about tree-sitter grammars yet, but I understand they are implemented in JavaScript. I imagine then that it should be possible to allow a plugin to transform the grammar before returning it to tree-sitter.

@Entoryvekum
Copy link

Entoryvekum commented Jan 29, 2023

I don't familiar with tree-sitter either, but I believe parsing math block will be similar to emphasis block (italics and bold).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants