Escape Mustache / Handlebar delimiters when beautifying css
See original GitHub issueCurrently using the beautifier to pretty up the following css, with custom templating {{}} delimiters for a dynamic variable.
.box {
display: flex;
color: {{data.color}};
}
On Beautification it turns into this
.box {
display: flex;
color: {
{
data.color
}
}
}
I’m pretty sure that the ‘unformatted_content_delimiter’ option is what is needed to allow for {{token}} to be escaped from beautification, but i can’t find in the documentation how to specify it nor any examples.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
https://raw.githubusercontent.com/beautify-web/js-...
... 'max\_preserve\_newlines' not working on beautify\_css.js CSS Beautifier ... Incorrect indentation of `^` inverted section tags in Handlebars/Mustache ...
Read more >Easy HTML Templates with Mustache
In this tutorial you'll explore Mustache, a relatively new and very simple template system that you can easily use to create HTML templates....
Read more >WVE - River Thames Conditions
Sippel reisen hofheim, Dave gorman tattoo youtube, Young beauty girl, ... Divert meaning in marathi, A href code css, Amasya simsim video izle, ......
Read more >mustache - npm
Mustache is a logic-less template syntax. It can be used for HTML, config files, source code - anything. It works by expanding tags...
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 FreeTop 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
Top GitHub Comments
unformatted_content_delimiter
is an html-only option.Templating is not currently supported in css. Adding it is on the list of things to do, but it is a larger task than you’d expect.
@samueljim The problem is that the cssbeautifier handles text processing in a bunch of different places, rather than tokenizing everything first. This makes very hard to catch all the places where templating might be used. For example you’d catch a bunch here, but there’s a check for nested pseudoclass](https://github.com/beautify-web/js-beautify/blob/master/js/src/css/beautifier.js#L116) that would still get confused.