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

Nunjucks should have priority over HTML #21

Open
code-tree opened this issue Oct 7, 2016 · 4 comments
Open

Nunjucks should have priority over HTML #21

code-tree opened this issue Oct 7, 2016 · 4 comments

Comments

@code-tree
Copy link

image

Syntax highlighting doesn't work when brackets are inside an opening tag or its attributes.

(nunjucks syntax is highlighted as red)

@alohaas
Copy link
Owner

alohaas commented Oct 11, 2016

Hey @code-tree thanks for the suggestion. I need to ask a clarifying question before making any conclusions or changes. Here's what I'm interpreting from your comment:

You would prefer that nunjucks inserted as html attributes be visually different from other, non-nunjucks html attributes. In other words, using your example, you want'description' and {{ desc }} rendering in different colors. One final question – are you imagining that {{ title }} and {{ desc }} should render in the same color?

@code-tree
Copy link
Author

Yes, that's correct to both. As currently, it seems as though the value in content="{{ desc }}" is simply a static string, when in fact it will be replaced by nunjucks.

I assume this is just a matter of giving nunjucks grammar priority over the html grammar, but I wasn't sure how to do that.

@alohaas
Copy link
Owner

alohaas commented Apr 14, 2017

Looking into this today.

@revelt
Copy link

revelt commented Oct 13, 2017

This is a biggie.. Currently good part of syntax highlighting does not happen because of this. For example, this is very apparent when coding inline HTML:

inline-nunjucks

I came here investigating what could be done enable proper syntax highlighting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants