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

Syntax Highlighting for Mustache IF #4

Open
dwsmyth opened this issue Oct 11, 2018 · 2 comments
Open

Syntax Highlighting for Mustache IF #4

dwsmyth opened this issue Oct 11, 2018 · 2 comments

Comments

@dwsmyth
Copy link

dwsmyth commented Oct 11, 2018

Hi Dan,
I am a big fan of logicless templates and mustache, so when I saw your syntax highlighting I jumped on it. I am having some difficulty with the syntax highlighting in Dark themes.

Here is a simple example of how using Mustache tags in a HTML document stops syntax highlighting.
<input type="text" {{#is_read_only}}disabled{{/is_read_only}} name="test" value=""/>

In the Dark color schemes /is_read_only}} is highlighted in one color, but {{^is_read_only}} is in another.

@dnwhte
Copy link
Owner

dnwhte commented Oct 15, 2018

I don't believe there is much I can do about this. It appears that vscode thinks there is a syntax error.

It adds the class mtk10 to the segment "{{/is_read_only}}" when it's in an html tag.

I see some have started adding their own stylesheets to override some of that stuff:
https://gist.github.com/DoroGi/56d6091e4bfc30c933ce697ebf1649d4

If you're interested here are the vscode tests:
https://github.com/Microsoft/vscode/blob/4c8e61c0499dfd7531ec99ab6723c1e4371ed2f3/src/vs/editor/test/common/viewLayout/viewLineRenderer.test.ts

I could be wrong, but to the best of my knowledge that's what is going on.

@michaeljsalo
Copy link

I am also using with VSCode dark themes, and can't tell if syntax highlighting is working right. Are open tags and close tags meant to show as different colors?
Screen Shot 2019-08-05 at 4 18 00 PM

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

3 participants