-
Notifications
You must be signed in to change notification settings - Fork 78
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
source.js.embedded.jade end issue #15
Comments
looking at this a little more carefully i'm trying to destruct the regex for source.js.embedded.jade. the following definition in the property for 'end' looks problematic:
the capturing group only captures exactly the same number of spaces that is before the 'script' keyword in the 'begin' property. the result is that direct siblings of the source tag look fine, but any higher (uncle, grand-uncle, etc) look like they are still part of the script block because it didn't match the requirement for 'end'. i'm not sure how to solve it because im not that good at regex, but it seems like the correct logic would be to change that to match anything equal to that number of spaces or less. is this a good place to use the recursion available in defining textmate language grammars to do pseudo-counting? |
Hi, I'm not sure if I understand the bug here, since the examples in the 1st post are 404-ing, but my issue resembles this one: To reproduce:
Fun thing, the single quote doesn't do the same (but fails anyway):
Additionnaly, the // of URLs in the script comment the rest of the line too (and thus highlights in the comment's color):
My understanding is that in a script tag, everything is not passed to source.js without any processing. I'm not good enough to find a way to fix this, but it seems that the highlighting of scripts inlined inside a jade file is completely failing... I hope someone will find out what to do! |
@aoberoi I fixed this by changing source.js.embedded.jade’s end expression to the following:
|
there seems to be a problem with the way the source.js.embedded.jade scope is terminated. let me show you what i mean:
(A) these work
(B) these don't, but should
notice the change in color of the body tag, this should be blue like all the other tags
the weirdest issue is that (A1) and (A2) work, the only difference being how much white space there is on line 5; but (B3), (B4), and (B5) do not. (B3) actually puts the newline between (A1) and (A2) and intermediately doesn't want to work.
i'm aware you're no longer actively maintaining this project and that you are accepting pull requests. my regex-foo isn't good enough to make a fix and i think for now this is the best place to make issues visible.
The text was updated successfully, but these errors were encountered: