Handlebars support
See original GitHub issueHey, I’m using your library in the sublime extension and was beginning to think whether there exists the possibility to add some custom parser for Handlebars? Because there are some specialities to using Handlebars (and in some time HTMLBars).
One example would be:
{{em-input label="Some Labe" property="amt" type="text" placeholder=""}} {{em-input label="Type*" property="type" type="text" placeholder="(LTD)"}} {{em-input label="Place*" property="place" type="text" placeholder=""}}
Should be formatted like this:
{{em-input label="Some Labe" property="amt" type="text" placeholder=""}}
{{em-input label="Type*" property="type" type="text" placeholder="(LTD)"}}
{{em-input label="Place*" property="place" type="text" placeholder=""}}
but the html-parser doesn’t understand that syntax. That is understandable but I like that to change 😃
Issue Analytics
- State:
- Created 8 years ago
- Reactions:7
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Handlebars
Mustache-compatible. Handlebars is largely compatible with Mustache templates. In most cases it is possible to swap out Mustache with Handlebars and continue ...
Read more >Handlebars.js documentation - DevDocs
Handlebars.js 4.0.12 API documentation with instant search, offline support, keyboard shortcuts, mobile version, and more.
Read more >A Beginner's Guide to Handlebars - SitePoint
Handlebars supports both normal and nested path, making it possible to look up properties nested below the current context.
Read more >Handlebars Support - IntelliJ IDEs Plugin | Marketplace
Handlebars Support · Go to Declaration from mustache fields to fields in POJO class · Completion for POJO class fields inside Hbs mustaches...
Read more >handlebars-lang/handlebars.js: Minimal templating on steroids.
If you need to support older environments, use Handlebars version 4. Performance. In a rough performance test, precompiled Handlebars.js templates (in the ...
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
Some current Handlebars-issues: #576 #566 #577 #623 #1040 #1173 #1199
It’s a little hard to nail down because the html beautifier doesn’t parse the tags into tokens before formatting.
This is the main loop. There are some special treatment of some handlebars tags but most of them are treated like regular tags. Not great. https://github.com/beautify-web/js-beautify/blob/master/js/src/html/beautifier.js#L882
If you do a search for
indent_handlebars
you’ll find a bunch of other places with special cases for handlebars.The best thing to do would be to get the html beautifier to parse all input separate from formatting, but that is a bigger effort.