1
0
Fork 0
forked from forgejo/forgejo

Update CodeMirror to version 5.49.0 (#8381)

* Update CodeMirror to version 5.49.0

* Update CodeMirror versions in librejs and VERSIONS
This commit is contained in:
oscar.lofwenhamn 2019-10-15 10:40:42 +02:00 committed by Lauris BH
parent 6fa14ac3c8
commit 1e9b330525
352 changed files with 14625 additions and 2451 deletions

View file

@ -14,14 +14,14 @@
<script src="../css/css.js"></script>
<script src="../coffeescript/coffeescript.js"></script>
<script src="../sass/sass.js"></script>
<script src="../jade/jade.js"></script>
<script src="../pug/pug.js"></script>
<script src="../handlebars/handlebars.js"></script>
<script src="../htmlmixed/htmlmixed.js"></script>
<script src="vue.js"></script>
<style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
<div id=nav>
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
<a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
<ul>
<li><a href="../../index.html">Home</a>

View file

@ -1,5 +1,5 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function (mod) {
"use strict";
@ -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);
@ -32,19 +32,26 @@
var tagLanguages = {
script: [
["lang", /coffee(script)?/, "coffeescript"],
["type", /^(?:text|application)\/(?:x-)?coffee(?:script)?$/, "coffeescript"]
["type", /^(?:text|application)\/(?:x-)?coffee(?:script)?$/, "coffeescript"],
["lang", /^babel$/, "javascript"],
["type", /^text\/babel$/, "javascript"],
["type", /^text\/ecmascript-\d+$/, "javascript"]
],
style: [
["lang", /^stylus$/i, "stylus"],
["lang", /^sass$/i, "sass"],
["lang", /^less$/i, "text/x-less"],
["lang", /^scss$/i, "text/x-scss"],
["type", /^(text\/)?(x-)?styl(us)?$/i, "stylus"],
["type", /^text\/sass/i, "sass"]
["type", /^text\/sass/i, "sass"],
["type", /^(text\/)?(x-)?scss$/i, "text/x-scss"],
["type", /^(text\/)?(x-)?less$/i, "text/x-less"]
],
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 +70,8 @@
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");
CodeMirror.defineMIME("text/x-vue", "vue");
});