See #828, #757, #731, #750. Fix Riot.js support,

add support to Pretty diff beautifier
This commit is contained in:
Glavin Wiechert 2016-02-25 23:30:34 -04:00
parent ee8c45becc
commit 3a6763a25c
2 changed files with 19 additions and 8 deletions

View File

@ -7,15 +7,25 @@
<script>
this.message = 'Hello, Riot!'
this.techs = [
{ name: 'HTML' },
{ name: 'JavaScript' },
{ name: 'CSS' }
{
name: 'HTML'
}, {
name: 'JavaScript'
}, {
name: 'CSS'
}
]
</script>
<style scoped>
:scope { font-size: 2rem }
h3 { color: #444 }
ul { color: #999 }
:scope {
font-size: 2rem;
}
h3 {
color: #444;
}
ul {
color: #999;
}
</style>
</sample>
</sample>

View File

@ -54,6 +54,7 @@ module.exports = class PrettyDiff extends Beautifier
LESS: true
Swig: true
Visualforce: true
"Riot.js": true
}
beautify: (text, language, options) ->
@ -73,7 +74,7 @@ module.exports = class PrettyDiff extends Beautifier
lang = "ejs"
when "ERB"
lang = "html_ruby"
when "Handlebars", "Mustache", "Spacebars", "Swig"
when "Handlebars", "Mustache", "Spacebars", "Swig", "Riot.js"
lang = "handlebars"
when "SGML"
lang = "markup"