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

Sublime Build 3103 HTML Highlighting #101

Open
Solanar opened this issue Feb 15, 2016 · 6 comments
Open

Sublime Build 3103 HTML Highlighting #101

Solanar opened this issue Feb 15, 2016 · 6 comments

Comments

@Solanar
Copy link

Solanar commented Feb 15, 2016

Sublime Text 3 Build 3103 seems to have broken highlighting for HTML (Django).
djaneiro-highlight-bud

@squ1b3r
Copy link
Owner

squ1b3r commented Feb 16, 2016

Just checked and everything seems to be okay. No other issues from other users. So I guess there is something off with your setup.

@Solanar
Copy link
Author

Solanar commented Feb 16, 2016

I disabled all packages except Djaneiro and tried again with built in colour scheme All Hallow's Eve:
djaneiro-highlight-bug2
Same issue, something in this script block is breaking something. The combination of <script></div></script> seems to cause it. I think it's because it expects javascript and a / is part of </script> or a js regex.
This is a knockout template.
I love using Djaneiro, it's been a massive help to my development. I'm not sure what changed as it was working before the new Sublime build, but I hope you'll take another look.

edit: I just realized, I don't know how your project works, but if you're sure this isn't an issue with Djaneiro, is it caused by Sublime?

@squ1b3r
Copy link
Owner

squ1b3r commented Feb 16, 2016

Yeah, I see the problem now. I need to rewrite syntax file at some point. 3103 introduced a new syntax file mechanic which can help with this. Have absolutely no idea when I might be able to get to it tho.

@Solanar
Copy link
Author

Solanar commented Feb 16, 2016

I've sort of got around it by including a django comment with a slash in it: {# / #}, but it's not ideal.
I see in the code (and tried it out) that type="text/template" has the correct highlighting. Would adding type="text/html" there be an easier fix until you have more time? I think the regex would become (?!.*type=["']text/(template|html)['"]).

@gunsmoke
Copy link

+1, having the same issue, but only when i use as a template holder.

@ptim
Copy link

ptim commented May 22, 2018

I found that a 'missing' trailing semi in a script tag can throw it off, too:

<!-- broken -->
<script>WebFontConfig={custom:{families:['MarrSans','PublicoText']},timeout: 2000}</script>`

<!-- working as expected -->
<script>WebFontConfig={custom:{families:['MarrSans','PublicoText']},timeout: 2000};</script>`

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

4 participants