Update CodeMirror to 5.19.0 and rename jade to pug

This commit is contained in:
Wu Cheng-Han 2016-10-10 21:15:29 +08:00
parent fb5d7e4359
commit 795ea21191
30 changed files with 341 additions and 209 deletions

View file

@ -12,7 +12,7 @@
require("../css/css"),
require("../sass/sass"),
require("../stylus/stylus"),
require("../jade/jade"),
require("../pug/pug"),
require("../handlebars/handlebars"));
} else if (typeof define === "function" && define.amd) { // AMD
define(["../../lib/codemirror",
@ -23,7 +23,7 @@
"../css/css",
"../sass/sass",
"../stylus/stylus",
"../jade/jade",
"../pug/pug",
"../handlebars/handlebars"], mod);
} else { // Plain browser env
mod(CodeMirror);
@ -42,9 +42,9 @@
],
template: [
["lang", /^vue-template$/i, "vue"],
["lang", /^jade$/i, "jade"],
["lang", /^pug$/i, "pug"],
["lang", /^handlebars$/i, "handlebars"],
["type", /^(text\/)?(x-)?jade$/i, "jade"],
["type", /^(text\/)?(x-)?pug$/i, "pug"],
["type", /^text\/x-handlebars-template$/i, "handlebars"],
[null, null, "vue-template"]
]
@ -63,7 +63,7 @@
CodeMirror.defineMode("vue", function (config) {
return CodeMirror.getMode(config, {name: "htmlmixed", tags: tagLanguages});
}, "htmlmixed", "xml", "javascript", "coffeescript", "css", "sass", "stylus", "jade", "handlebars");
}, "htmlmixed", "xml", "javascript", "coffeescript", "css", "sass", "stylus", "pug", "handlebars");
CodeMirror.defineMIME("script/x-vue", "vue");
});