-
Notifications
You must be signed in to change notification settings - Fork 54
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 wiki-links support (#54) #97
Add wiki-links support (#54) #97
Conversation
Hey, thank you, this looks great. Not sure if it breaks in some edge cases, e.g. nested links, but that is not too important. I would make it a "non-default" extension for the moment if that is ok with you? That would mean removing the It also looks like you broke 2 test cases, see https://github.com/MDeiml/tree-sitter-markdown/actions/runs/4902920851/jobs/8755052765?pr=97. Could you have a look at that? |
Because Wiki-link parsing is an extension, prioritizing the wiki-link syntax in nested-link should solve the problem. Example 556 in
I actually tried to make this non-default extension, but I couldn't figured out how to build & test as non-default extension. I learned tree-sitter syntax first time while making this PR. Can you give me an example of building & testing non-default extensions? That will be helpful.
Those two test cases should be broken when wiki-link option is on. That is intended behavior because Wiki-link is not in CommonMark/GFM spec. Should I remove those test cases? |
Sorry for the late answer.
You have to set the environment variable corresponding to the extension you want to enable, e.g.
Hm not to sure how to deal with this, I guess you can remove them for now and I'll think of something later. |
@MDeiml I fixed points you said. Can you check this? |
fc184fa
to
1bd5f37
Compare
These two test cases will be broken when wiki-link option is on.
Thanks a lot, this is great! Build tests were just failing, because my CI used an older version of tree-sitter, but I just updated that to the newer version you were using. |
Thanks for your work, I think a lot of people will be happy about this feature. Also sorry I took long with responding. |
Added basic wiki-link parsing based on Obsidian's wikilink.