diff --git a/examples/simple-jsbeautifyrc/visualforce/expected/basic-page-using-detail.page b/examples/simple-jsbeautifyrc/visualforce/expected/basic-page-using-detail.page new file mode 100644 index 0000000..3a0bf5c --- /dev/null +++ b/examples/simple-jsbeautifyrc/visualforce/expected/basic-page-using-detail.page @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/examples/simple-jsbeautifyrc/visualforce/expected/basic-page.page b/examples/simple-jsbeautifyrc/visualforce/expected/basic-page.page new file mode 100644 index 0000000..d10e22e --- /dev/null +++ b/examples/simple-jsbeautifyrc/visualforce/expected/basic-page.page @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/examples/simple-jsbeautifyrc/visualforce/expected/page-with-inputfield.page b/examples/simple-jsbeautifyrc/visualforce/expected/page-with-inputfield.page new file mode 100644 index 0000000..643f0b8 --- /dev/null +++ b/examples/simple-jsbeautifyrc/visualforce/expected/page-with-inputfield.page @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/simple-jsbeautifyrc/visualforce/expected/page-with-outputfield.page b/examples/simple-jsbeautifyrc/visualforce/expected/page-with-outputfield.page new file mode 100644 index 0000000..966014a --- /dev/null +++ b/examples/simple-jsbeautifyrc/visualforce/expected/page-with-outputfield.page @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/simple-jsbeautifyrc/visualforce/original/basic-page-using-detail.page b/examples/simple-jsbeautifyrc/visualforce/original/basic-page-using-detail.page new file mode 100644 index 0000000..3a0bf5c --- /dev/null +++ b/examples/simple-jsbeautifyrc/visualforce/original/basic-page-using-detail.page @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/examples/simple-jsbeautifyrc/visualforce/original/basic-page.page b/examples/simple-jsbeautifyrc/visualforce/original/basic-page.page new file mode 100644 index 0000000..d10e22e --- /dev/null +++ b/examples/simple-jsbeautifyrc/visualforce/original/basic-page.page @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/examples/simple-jsbeautifyrc/visualforce/original/page-with-inputfield.page b/examples/simple-jsbeautifyrc/visualforce/original/page-with-inputfield.page new file mode 100644 index 0000000..643f0b8 --- /dev/null +++ b/examples/simple-jsbeautifyrc/visualforce/original/page-with-inputfield.page @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/simple-jsbeautifyrc/visualforce/original/page-with-outputfield.page b/examples/simple-jsbeautifyrc/visualforce/original/page-with-outputfield.page new file mode 100644 index 0000000..966014a --- /dev/null +++ b/examples/simple-jsbeautifyrc/visualforce/original/page-with-outputfield.page @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/beautifiers/prettydiff.coffee b/src/beautifiers/prettydiff.coffee index 67f47b8..ceb1f22 100644 --- a/src/beautifiers/prettydiff.coffee +++ b/src/beautifiers/prettydiff.coffee @@ -30,6 +30,7 @@ module.exports = class PrettyDiff extends Beautifier TSS: true LESS: true Swig: true + Visualforce: true } beautify: (text, language, options) -> @@ -43,21 +44,34 @@ module.exports = class PrettyDiff extends Beautifier switch language when "CSV" lang = "csv" - when "EJS", "ERB", \ - "Handlebars", "Mustache", \ - # "Markup", "JSTL", "SGML", \ # Currently unsupported - "Spacebars", "XML", "Swig" + when "EJS" + lang = "ejs" + when "ERB" + lang = "html_ruby" + when "Handlebars", "Mustache", "Spacebars" + lang = "handlebars" + when "SGML", "Swig" lang = "markup" + when "XML", "Visualforce" + lang = "xml" when "HTML" lang = "html" - when "JavaScript", "JSON", "JSX" + when "JavaScript" lang = "javascript" - when "CSS", "LESS", "SCSS", "Sass" + when "JSON" + lang = "json" + when "JSX" + lang = "jsx" + when "JSTL" + lang = "jsp" + when "CSS" lang = "css" + when "LESS" + lang = "less" + when "SCSS", "Sass" + lang = "scss" when "TSS" lang = "tss" - # when "Plain text" - # lang = "text" else lang = "auto" diff --git a/src/languages/index.coffee b/src/languages/index.coffee index 9e42db1..76077eb 100644 --- a/src/languages/index.coffee +++ b/src/languages/index.coffee @@ -53,6 +53,7 @@ module.exports = class Languages "tss" "typescript" "vala" + "visualforce" "xml" ] diff --git a/src/languages/visualforce.coffee b/src/languages/visualforce.coffee new file mode 100644 index 0000000..cba1016 --- /dev/null +++ b/src/languages/visualforce.coffee @@ -0,0 +1,23 @@ +module.exports = { + + name: "Visualforce" + namespace: "visualforce" + fallback: ['html','xml'] + + ### + Supported Grammars + ### + grammars: [ + "Visualforce" + ] + + ### + Supported extensions + ### + extensions: [ + "page" + ] + + options: [] + +} \ No newline at end of file