daaain / Handlebars

Fullest Handlebars.js templating support for Sublime Text 2 / 3. Also drives syntax colouring on Github and in Visual Studio Code. Install from: https://packagecontrol.io/packages/Handlebars.
MIT License
301 stars 48 forks source link

support whitespace control #26

Closed oliverzy closed 10 years ago

oliverzy commented 10 years ago

In the latest handlebars, it has support whitespace control: https://github.com/wycats/handlebars.js/pull/336

How can modify this plugin to support this feature?

Thanks

daaain commented 10 years ago

Nice, haven't even seen this yet!

I've added some tests based on the official Handlebars test suite, see https://github.com/daaain/Handlebars/blob/master/test/inline_script.html#L85

It's going to be a fair bit of work, basically all the opening and closing token regular expressions (\\{\\{ and \\}\\}) will need to be reviewed in the block start / end definitions in Handlebars.JSON-tmLanguage.

oliverzy commented 10 years ago

yes, understand. but the feature is really cool. looking forward to the new version

oliverzy commented 10 years ago

1.1.0 finally released! https://github.com/wycats/handlebars.js/blob/master/release-notes.md Please add support for new whitespace control syntax.

Thanks

utkarshkukreti commented 10 years ago

@oliverzy I opened a pull request if you'd like to test it - https://github.com/daaain/Handlebars/issues/35