Looking for double quotes inside Jinja tags
See original GitHub issueHi, thanks for the excellent tool! When running on Jinja2 templates it generally works pretty well. However, when there is an if statement inside a tag this error comes up -

The html is:
<!DOCTYPE HTML>
<option value="{{ t.id }}" {% if t.id == s.type_id %}selected{% endif %}>{{ t.name }}</option>
and run htmlhint:
npx htmlhint test.html
Is there a way that at htmlhint can ignore what is inside a {% ... %} and {{ ... }} ?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:13 (10 by maintainers)
Top Results From Across the Web
Escaping quotes in jinja2 - python - Stack Overflow
Jinja2 has nice filter tojson. If you make json from string, it will generate string enclosed in double quotes "". You can safely...
Read more >Jinja2 converting double quotes to single quotes
I've tried various ways of quoting, both in the template and in values.json. Sample hitting the issue: output.json: {. "keepDoubleQuotes ...
Read more >Inserting Jinja variable into a quoted string - Server Fault
The combination {% opens a Jinja statement. To avoid this interpretation put the brace into a variable, e.g.. BR: '{{ "{" }}'. and...
Read more >Why do I need to quote column names in Jinja?
We have to use quotes to pass the string 'amount' to the macro. Without the quotes, the Jinja parser will look for a...
Read more >Template Designer Documentation - Jinja
You can mess around with the variables in templates provided they are passed in by the ... Additionally, the attr() filter only looks...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Great tool, and ditto on a request for this feature. I’m using nunjucks templates, which is basically the same syntax as jinja. Although I’m wondering if it might be better to add to the rc file definition some sort of way to express file-extension-specific overrides, for example something like:
anyway, just my two cents. I figure that might make it easier to support all sorts of html template syntaxes.