From aa06255e6f601682f5c6e7c8e7e2219c30b53fee Mon Sep 17 00:00:00 2001 From: Peter Shin Date: Sat, 21 Feb 2015 12:27:39 -0800 Subject: [PATCH 1/3] 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 -> From 893ab473daaf8db8713bb617357fa8e92087a577 Mon Sep 17 00:00:00 2001 From: Peter Shin Date: Sat, 21 Feb 2015 12:33:41 -0800 Subject: [PATCH 2/3] Updated README with marko info. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 24f0938..cc96291 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,8 @@ Or Settings/Preferences ➔ Packages ➔ Search for `atom-beautify` - [x] [Embedded Ruby (ERB)](https://github.com/Glavin001/atom-beautify/issues/80) - Requires [htmlbeautifier](https://github.com/threedaymonk/htmlbeautifier) - [x] XML + - [x] [Marko](https://github.com/raptorjs/marko) + - Requires [language-marko](https://github.com/raptorjs/atom-language-marko) - [x] CSS, including - [Sass](http://sass-lang.com/) - [LESS](http://lesscss.org/) From 8d870d0a25c9bd879a62ab1dbc5d3024cc4204c6 Mon Sep 17 00:00:00 2001 From: Peter Shin Date: Sat, 21 Feb 2015 13:10:37 -0800 Subject: [PATCH 3/3] Correcting new line. --- examples/nested-jsbeautifyrc/marko/expected/test.marko | 2 +- examples/simple-jsbeautifyrc/marko/expected/test.marko | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/nested-jsbeautifyrc/marko/expected/test.marko b/examples/nested-jsbeautifyrc/marko/expected/test.marko index ee4b0ff..27e2187 100644 --- a/examples/nested-jsbeautifyrc/marko/expected/test.marko +++ b/examples/nested-jsbeautifyrc/marko/expected/test.marko @@ -5,4 +5,4 @@ content - + \ No newline at end of file diff --git a/examples/simple-jsbeautifyrc/marko/expected/test.marko b/examples/simple-jsbeautifyrc/marko/expected/test.marko index 911857f..20e1097 100644 --- a/examples/simple-jsbeautifyrc/marko/expected/test.marko +++ b/examples/simple-jsbeautifyrc/marko/expected/test.marko @@ -3,4 +3,4 @@ content - + \ No newline at end of file