diff --git a/.travis.yml b/.travis.yml index 12c86c9..c34c854 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ notifications: script: sh build-package.sh env: - - APM_TEST_PACKAGES="language-marko language-tss language-html-swig" + - APM_TEST_PACKAGES="language-marko language-tss language-html-swig language-svg" cache: - pip diff --git a/README.md b/README.md index 3751369..072e471 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ 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] SVG - [x] [Marko](https://github.com/raptorjs/marko) - Requires [language-marko](https://github.com/raptorjs/atom-language-marko) - [x] CSS, including diff --git a/appveyor.yml b/appveyor.yml index d4f76b2..5492d04 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -112,7 +112,7 @@ build_script: - cd %APPVEYOR_BUILD_FOLDER% # Install languages to Atom - - apm install language-marko language-tss language-html-swig + - apm install language-marko language-tss language-html-swig language-svg # Show current PATH - echo %PATH% # Run tests on package diff --git a/package.json b/package.json index 2ca0768..b6206fc 100644 --- a/package.json +++ b/package.json @@ -146,7 +146,8 @@ "jekyll", "marko", "go", - "golang" + "golang", + "svg" ], "devDependencies": { "coffee-script": "^1.9.3", diff --git a/spec/beautify-languages-spec.coffee b/spec/beautify-languages-spec.coffee index 2bdb59c..eaa0b60 100644 --- a/spec/beautify-languages-spec.coffee +++ b/spec/beautify-languages-spec.coffee @@ -24,7 +24,7 @@ describe "BeautifyLanguages", -> "c", "coffee-script", "css", "html", "java", "javascript", "json", "less", "mustache", "objective-c", "perl", "php", - "python", "ruby", "sass", "sql", + "python", "ruby", "sass", "sql", "svg", "xml", "csharp", "gfm", "marko", "tss", "go", "html-swig" ] diff --git a/src/beautifiers/prettydiff.coffee b/src/beautifiers/prettydiff.coffee index d27d50b..64f9358 100644 --- a/src/beautifiers/prettydiff.coffee +++ b/src/beautifiers/prettydiff.coffee @@ -33,6 +33,7 @@ module.exports = class PrettyDiff extends Beautifier EJS: true HTML: true XML: true + SVG: true Spacebars: true JSX: true JavaScript: true @@ -66,7 +67,7 @@ module.exports = class PrettyDiff extends Beautifier lang = "handlebars" when "SGML", "Swig" lang = "markup" - when "XML", "Visualforce" + when "XML", "Visualforce", "SVG" lang = "xml" when "HTML" lang = "html" diff --git a/src/languages/index.coffee b/src/languages/index.coffee index d3ffb0c..ab41369 100644 --- a/src/languages/index.coffee +++ b/src/languages/index.coffee @@ -44,6 +44,7 @@ module.exports = class Languages "scss" "spacebars" "sql" + "svg" "swig" "tss" "twig" diff --git a/src/languages/svg.coffee b/src/languages/svg.coffee new file mode 100644 index 0000000..c9a930a --- /dev/null +++ b/src/languages/svg.coffee @@ -0,0 +1,26 @@ +module.exports = { + + name: "SVG" + description: "SVG" + namespace: "svg" + fallback: ['html','xml'] + + ### + Supported Grammars + ### + grammars: [ + "SVG" + ] + + ### + Supported extensions + ### + extensions: [ + 'svg' + ] + + defaultBeautifier: "Pretty Diff" + + options: [] + +}