From aa06255e6f601682f5c6e7c8e7e2219c30b53fee Mon Sep 17 00:00:00 2001 From: Peter Shin Date: Sat, 21 Feb 2015 12:27:39 -0800 Subject: [PATCH] Added support Marko templates. --- .travis.yml | 2 +- examples/nested-jsbeautifyrc/marko/expected/test.marko | 8 ++++++++ examples/nested-jsbeautifyrc/marko/original/test.marko | 8 ++++++++ examples/simple-jsbeautifyrc/marko/expected/test.marko | 6 ++++++ examples/simple-jsbeautifyrc/marko/original/test.marko | 6 ++++++ lib/language-options.coffee | 2 +- package.json | 3 ++- spec/beautify-languages-spec.coffee | 2 +- 8 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 examples/nested-jsbeautifyrc/marko/expected/test.marko create mode 100644 examples/nested-jsbeautifyrc/marko/original/test.marko create mode 100644 examples/simple-jsbeautifyrc/marko/expected/test.marko create mode 100644 examples/simple-jsbeautifyrc/marko/original/test.marko diff --git a/.travis.yml b/.travis.yml index dec6242..aba5001 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ notifications: script: sh build-package.sh env: - - APM_TEST_PACKAGES="language-typescript language-csharp" + - APM_TEST_PACKAGES="language-typescript language-csharp language-marko" before_install: # Update Homebrew diff --git a/examples/nested-jsbeautifyrc/marko/expected/test.marko b/examples/nested-jsbeautifyrc/marko/expected/test.marko new file mode 100644 index 0000000..ee4b0ff --- /dev/null +++ b/examples/nested-jsbeautifyrc/marko/expected/test.marko @@ -0,0 +1,8 @@ + + +
${item.name}
+
+
+ + content + diff --git a/examples/nested-jsbeautifyrc/marko/original/test.marko b/examples/nested-jsbeautifyrc/marko/original/test.marko new file mode 100644 index 0000000..8bf706a --- /dev/null +++ b/examples/nested-jsbeautifyrc/marko/original/test.marko @@ -0,0 +1,8 @@ + + +
${item.name}
+
+
+ + content + diff --git a/examples/simple-jsbeautifyrc/marko/expected/test.marko b/examples/simple-jsbeautifyrc/marko/expected/test.marko new file mode 100644 index 0000000..911857f --- /dev/null +++ b/examples/simple-jsbeautifyrc/marko/expected/test.marko @@ -0,0 +1,6 @@ + + content + + + content + diff --git a/examples/simple-jsbeautifyrc/marko/original/test.marko b/examples/simple-jsbeautifyrc/marko/original/test.marko new file mode 100644 index 0000000..43459e8 --- /dev/null +++ b/examples/simple-jsbeautifyrc/marko/original/test.marko @@ -0,0 +1,6 @@ + +content + + +content + diff --git a/lib/language-options.coffee b/lib/language-options.coffee index 3d017d6..8ee7734 100644 --- a/lib/language-options.coffee +++ b/lib/language-options.coffee @@ -410,7 +410,7 @@ module.exports = beautifyHTML ?= require("js-beautify").html text = beautifyHTML(text, self.getOptions("html", allOptions)) beautifyCompleted text - when "HTML (Liquid)", "HTML", "XML" + when "HTML (Liquid)", "HTML", "XML", "Marko" beautifyHTML ?= require("js-beautify").html text = beautifyHTML(text, self.getOptions("html", allOptions)) beautifyCompleted text diff --git a/package.json b/package.json index 6bb7813..a22c1ed 100644 --- a/package.json +++ b/package.json @@ -117,6 +117,7 @@ "editorconfig", "yaml", "front matter", - "jekyll" + "jekyll", + "marko" ] } diff --git a/spec/beautify-languages-spec.coffee b/spec/beautify-languages-spec.coffee index 229907d..da9ce3d 100644 --- a/spec/beautify-languages-spec.coffee +++ b/spec/beautify-languages-spec.coffee @@ -21,7 +21,7 @@ describe "BeautifyLanguages", -> "java", "javascript", "json", "less", "mustache", "objective-c", "perl", "php", "python", "ruby", "sass", "sql", - "typescript", "xml", "csharp", "gfm" + "typescript", "xml", "csharp", "gfm", "marko" ] beforeEach ->