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

Add markdown grammar #79

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add markdown grammar #79

wants to merge 2 commits into from

Conversation

FeiyouG
Copy link

@FeiyouG FeiyouG commented Aug 9, 2022

No description provided.

@smacker
Copy link
Owner

smacker commented Aug 14, 2022

Hi @FeiyouG ! Thank you for your contribution.

I have noticed in the current form the parser is a bit hard to use.

According to documentation:

The parser is spit into two grammars
To use the two grammars, first parse the document with the block grammar. Then perform a second parse with the inline grammar using ts_parser_set_included_ranges to specify which parts are inline content.

Do you think we could do it in the binding itself? Similar to how it is implemented in the Rust binding.

So go-tree-sitter could expose 3 markdown grammars:

  • markdown - to be used in most cases and combines the other 2
  • markdown/inline - for advanced use-cases
  • markdown/block - for advanced use-cases

@FeiyouG
Copy link
Author

FeiyouG commented Aug 14, 2022

Sure thing. I will be looking into this as soon as I get some free time.

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

Successfully merging this pull request may close these issues.

2 participants