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

link_reference_definition not parsed when on last line of file #47

Open
mjbvz opened this issue Jun 22, 2022 · 2 comments
Open

link_reference_definition not parsed when on last line of file #47

mjbvz opened this issue Jun 22, 2022 · 2 comments

Comments

@mjbvz
Copy link

mjbvz commented Jun 22, 2022

Steps to reproduce

Parse the markdown:

[ref]

[ref]: http://example.com

Bug 🐛

This results in the tree:

(document (paragraph (link (link_text (text)))) (paragraph (link (link_text (text))) (text) (uri_autolink (text))))

Notice how the link definition is not found

Expected

If I add a blank line the end of the file like so:

[ref]

[ref]: http://example.com

I instead see:

(document (paragraph (link (link_text (text)))) (link_reference_definition (link_label (text)) (link_destination (text))))

This seems to be the expected parsing

@D00mch
Copy link

D00mch commented Jul 12, 2022

I have also created issue in treesitter repo.

@D00mch
Copy link

D00mch commented Jul 12, 2022

seems like this is a different problem, sorry

danielpunkass pushed a commit to danielpunkass/tree-sitter-markdown-ikatyang that referenced this issue Oct 25, 2022
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

2 participants