From ecbbbaec2942ed95461e2c103d23bd3665edab2e Mon Sep 17 00:00:00 2001 From: Glavin Wiechert Date: Sun, 26 Oct 2014 16:11:44 -0300 Subject: [PATCH] Closes #123. Add Mustache support. --- examples/simple-jsbeautifyrc/test.mustache | 16 ++++++++++++++++ lib/language-options.coffee | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 examples/simple-jsbeautifyrc/test.mustache diff --git a/examples/simple-jsbeautifyrc/test.mustache b/examples/simple-jsbeautifyrc/test.mustache new file mode 100644 index 0000000..196584c --- /dev/null +++ b/examples/simple-jsbeautifyrc/test.mustache @@ -0,0 +1,16 @@ +

{{header}}

+{{#bug}} +{{/bug}} + +{{#items}} +{{#first}} +
  • {{name}}
  • +{{/first}} +{{#link}} +
  • {{name}}
  • +{{/link}} +{{/items}} + +{{#empty}} +

    The list is empty.

    +{{/empty}} diff --git a/lib/language-options.coffee b/lib/language-options.coffee index e75f9a5..7b6c54d 100644 --- a/lib/language-options.coffee +++ b/lib/language-options.coffee @@ -159,7 +159,7 @@ module.exports = when "CoffeeScript" beautifyCoffeeScript ?= require("./langs/coffeescript-beautify") beautifyCoffeeScript text, self.getOptions("js", allOptions), beautifyCompleted - when "Handlebars" + when "Handlebars", "HTML (Mustache)" # jshint ignore: start allOptions.push indent_handlebars: true # Force jsbeautify to indent_handlebars # jshint ignore: end