-
Notifications
You must be signed in to change notification settings - Fork 17
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 highlighting when colon is used inside yaml literal style #17
Comments
This issue and the other four just closed as duplicates all are tied to the same underlying issue. The string rule is not being properly entered in This is a complicated issue to fix, working on how to do so now. |
Is there anything we can do to help? Would more test cases help? |
There is not, this is a current limitation of the grammar engine and I don't believe it is possible to fix on the grammar side. Unless I figure out an alternate method this will need to wait for a fix on the parser side of things. |
@aeschli seeing the answer above, would it make sense then to reopen the vscode issue microsoft/vscode#13601 since it can't be fixed in the grammar and actually needs a change on the vscode side as well? |
@kamshak So a better description of the issue since I haven't talked it about it yet in these issues:
The current limitation is that the state that If we decide to make this change it will need to be updated in VSCode and GitHub as well, I'll open issues with both if this is the course taken. The alternative is to find another solution to workaround the limitation, but so far I have not been successful in finding an alternative, without being able to save the state it's hard to not prematurely exit the rule. |
Any movement on this? It's a very annoying bug :-( |
Since @infininight has kindly explained the issue in a very detailed way, maybe someone familiar with VSCode would be willing to take a look at it :) It seems we're stuck without some help Sorry for tagging you out of the blue @alexandrudima @bpasero, is there a chance you could take a quick look at this issue (or tag someone who could)? Would be very much appreciated! ❤️ |
You mentioned that it was a parsing issue. I just wanted to chime in and say that multiline string highlighting works perfectly if the string is enclosed in quotes. test:
"note that this green as it should be:
when there's no colon, it also works correctly
same solution here: and after the colon it's OK"
test: |
but when using a pipe, it breaks again:
when there's no colon, it works correctly
same problem here: but after the colon it's OK
test: >
when using a right arrow it also breaks:
when there's no colon, it works correctly
same problem here: but after the colon it's OK
test:
"this also works correctly"
test: |
as does this
test: >
and this
test:
and also this Hopefully this helps narrow down the issue and/or potential solutions. |
It seems to detect comments used inside yaml multiline value too, which is also wrong. Also it seems to depend whether the first line of the multiline value is an empty line or not. though, as far as I know, both are valid YAML (There is no reason a multiline could not start by a line return):
(Color is back to normal if I put two spaces instead of the empty line, but VSCode tends to remove them afterwards.) My VSCode version:
|
From @tnikodym on October 12, 2016 14:34
See the screenshot below. When a colon is used inside literal content (indicated by | character), the entire line up to the colon is highlighted as a property.
Note: I have not seen this issue in the previous version of VSCode.
Copied from original issue: microsoft/vscode#13601
The text was updated successfully, but these errors were encountered: