-
Notifications
You must be signed in to change notification settings - Fork 115
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
[jade] Incorrect highlighting in strings with inline tags #22
Comments
This issue was moved to davidrios/jade-tmbundle#67 |
From @mrmlnc on September 2, 2016 18:1 @aeschli, as I understand, this issue is related to the bug (feature) in vscode-textmate? I ask this because I can fix Jade tmLanguage in VS Code (including other issues aka small refactoring). Does it make sense to do it? UPD: And if it makes sense, then use PR or create demo extension? |
From @mrmlnc on September 5, 2016 22:49 @aeschli, you can see demo extension in VS Code 1.5.0 https://github.com/mrmlnc/vscode-jade-syntax
|
We should fix that in https://github.com/Microsoft/vscode-textmate |
@mrmlnc @aeschli This issue has been moved so many times with automated tools and it contains screenshots of various inputs. I am not a Jade expert, so I do not understand what it is about. Can you please help me out with a pointer to the grammar file, input text, what should happen vs what happens? |
@alexandrudima, yes, of course. Clarification: that issue also reproduced in Atom with this grammar, but not Sublime Text 2 & 3. Minimal code example.class One #[span text.] Two text. Current resultTokens
HighlightingExpected resultTokens
Let me know if I can help you with understanding of this problem. |
Most interesting, when I load only the jade grammar I get the desired results. I think it has something to do with including also the JavaScript grammar. I will try that next. (I have an inspect script in this project that helps with debugging)
|
If I overwrite So at this point I don't think this is an issue inside vscode-textmate. @aeschli Perhaps you need to update the Jade grammar inside vscode? [I am not sure why you moved this issue in this repo?] Please note |
@alexandrudima, my repository (vscode-jade-syntax) contains my fixes for this problem. But why Sublime Text works without changes? |
@mrmlnc Sorry for not understanding. You say "Clarification: that issue also reproduced in Atom with this grammar, but not Sublime Text 2 & 3.". but I honestly don't know which grammar you mean. I took the one from vscode-jade-syntax/syntaxes/jade.json . Can you please tell me which grammar you'd like me to try? |
@alexandrudima, oh, sorry, I talk about original Jade syntax: https://github.com/Microsoft/vscode/tree/master/extensions/jade/syntaxes |
@mrmlnc Thanks for the clarification. So I'm using the grammar at https://github.com/Microsoft/vscode/blob/9ae0f9d05a7d0c4f8338f4433aee21ac0140485f/extensions/jade/syntaxes/Jade.json I cannot speculate about Sublime's implementation (it could have its own bugs?), of interest to me would be the behaviour of TextMate. I don't have access to a mac right now, @aeschli can you please try our Jade grammar on this input in TextMate? I have added even more debugging information and I have looked at the detailed debug output and ... I don't see any bug, it appears to me the engine interprets the syntax correctly. . Here is my interpretation:
I don't know what the intent of the grammar is, is it correctly looking at this point for Here is the complete debug output:
|
@mrmlnc Any thoughts on this? |
Sorry, @alexandrudima, here should be just
Soon I'll see how work the regular expression from my repository. And let you know about my thoughts. |
Hello, @alexandrudima and @aeschli, I think we can close this issue? I tried to work with TextMate2 and there's this grammar is working properly. I see that you started updating some grammar (microsoft/vscode@f1672e4, microsoft/vscode@fbdf234 and etc.). Well, I think I'll be contribute to one of the implementations of Jade grammar and try to solve all my problems. Later I'll create the issue in VS Code repository with request to update Jade grammar. |
This is an old issue, but PR #86 would fix this. The error occurs at:
See how items 70 and 72 are the same? That is happening because a rule is getting skipped because its begin value is "" (empty), Item 72 is the first of its inner patterns, but because its blank begin rule is ignored, the other rules are not pushed away, and so the tag rule just keeps consuming the text (matching rule 68), until the end rule for the closing bracket is met. The detail of two identical rules is what tipped me to look at the grammar closer, to catch the empty begin. |
From @mrmlnc on January 4, 2016 12:54
VS Code version:
0.10.6
Code:
Description:
If you try to write a dot in a inline tag (tag Interpolation), text highlighting changes.
Gif:
Copied from original issue: microsoft/vscode#1765
The text was updated successfully, but these errors were encountered: