-
Notifications
You must be signed in to change notification settings - Fork 55
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
Incorrect syntax highlighting of tag with note #74
Comments
I'd be happy to review any PRs related to this. Note that it would be nice to keep in mind that |
See discussion in Neovim Gitter chat related to how to support two syntax variants in one filetype. See sh filetype support and it's support for bash variants. |
I started working on this to include in PR #94, but I'm not quite sure how to fix this without gutting the current tag matching rules and I don't want to do that without an understanding of what I might be breaking. @kljohann I'm having a really hard time making out why the tag parser is so complicated. Lines 85 to 89 in 7044a98
It seems to me this could be about 100 times simpler, since tags are only allowed in comments anyway we just have to match |
For ease of anybody else working on this, the approximate situation in the original issue can be copied from here:
|
@alerque I don't quite remember all the details, but a look at https://www.ledger-cli.org/3.0/doc/ledger3.html and
Note that the match rule you highlighted was only intended to highlight a series of tags, not the tag names of key-value metadata settings. There is So as you suggested the expression can likely be radically simplified. Here are some notes from a glance at the definition of item_t::parse_tags():
I hope that helps. :) |
Sometimes I have a tag with additional note on a single line (like in 2nd or 3rd transaction) and now they are highlighted not like normal tags (like in 1st transaction):
Ledger in strict mode reports:
So these tags should be highlighted as tags.
The text was updated successfully, but these errors were encountered: