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

ranged tags aren't highlighted properly #60

Open
flexagoon opened this issue Mar 26, 2024 · 3 comments
Open

ranged tags aren't highlighted properly #60

flexagoon opened this issue Mar 26, 2024 · 3 comments

Comments

@flexagoon
Copy link

flexagoon commented Mar 26, 2024

image

This doesn't look right. The opening tag is highlighted, while the closing one isn't.

Looking at the TS tree shows that it doesn't parse the segment correctly

image

This also means that the tags don't do what they're supposed to, and e.g. text inside of the |example tag is still rendered

@flexagoon flexagoon changed the title |example blocks in the spec aren't highlighted properly ranged tags aren't highlighted properly Mar 26, 2024
@flexagoon
Copy link
Author

UPD: ranged tags work when there's just text inside of them, but some markup like headings or other tags break it.

@flexagoon
Copy link
Author

This seems to be due to ranged tag content expecting a paragraph:

$.paragraph,

So any non-paragraph markup is disallowed

@flexagoon
Copy link
Author

@vhyrro I think this can be fixed by simply replacing the $.paragraph selector with a choice similar to what's currently used in $.document. However, AFAIK the |example tag should not render the text inside of it. Is it something that's supposed to be implemented in the treesitter parser, or is that functionality on the side of neorg?

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

1 participant