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

View File

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