Add SVG support

This commit is contained in:
Sebastian Schlatow 2015-07-07 00:05:35 +02:00
parent 018f0c03ac
commit a58ebf889d
5 changed files with 31 additions and 2 deletions

View File

@ -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

View File

@ -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"
]

View File

@ -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"

View File

@ -44,6 +44,7 @@ module.exports = class Languages
"scss"
"spacebars"
"sql"
"svg"
"swig"
"tss"
"twig"

26
src/languages/svg.coffee Normal file
View File

@ -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: []
}