mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-21 10:45:20 -04:00
Updated codemirror to 5.4.0
This commit is contained in:
parent
1d843c8ac2
commit
01685c255f
69 changed files with 2988 additions and 558 deletions
27
public/vendor/codemirror/mode/tiki/tiki.js
vendored
27
public/vendor/codemirror/mode/tiki/tiki.js
vendored
|
@ -52,35 +52,27 @@ CodeMirror.defineMode('tiki', function(config) {
|
|||
case "{": //plugin
|
||||
stream.eat("/");
|
||||
stream.eatSpace();
|
||||
var tagName = "";
|
||||
var c;
|
||||
while ((c = stream.eat(/[^\s\u00a0=\"\'\/?(}]/))) tagName += c;
|
||||
stream.eatWhile(/[^\s\u00a0=\"\'\/?(}]/);
|
||||
state.tokenize = inPlugin;
|
||||
return "tag";
|
||||
break;
|
||||
case "_": //bold
|
||||
if (stream.eat("_")) {
|
||||
if (stream.eat("_"))
|
||||
return chain(inBlock("strong", "__", inText));
|
||||
}
|
||||
break;
|
||||
case "'": //italics
|
||||
if (stream.eat("'")) {
|
||||
// Italic text
|
||||
if (stream.eat("'"))
|
||||
return chain(inBlock("em", "''", inText));
|
||||
}
|
||||
break;
|
||||
case "(":// Wiki Link
|
||||
if (stream.eat("(")) {
|
||||
if (stream.eat("("))
|
||||
return chain(inBlock("variable-2", "))", inText));
|
||||
}
|
||||
break;
|
||||
case "[":// Weblink
|
||||
return chain(inBlock("variable-3", "]", inText));
|
||||
break;
|
||||
case "|": //table
|
||||
if (stream.eat("|")) {
|
||||
if (stream.eat("|"))
|
||||
return chain(inBlock("comment", "||"));
|
||||
}
|
||||
break;
|
||||
case "-":
|
||||
if (stream.eat("=")) {//titleBar
|
||||
|
@ -90,22 +82,19 @@ CodeMirror.defineMode('tiki', function(config) {
|
|||
}
|
||||
break;
|
||||
case "=": //underline
|
||||
if (stream.match("==")) {
|
||||
if (stream.match("=="))
|
||||
return chain(inBlock("tw-underline", "===", inText));
|
||||
}
|
||||
break;
|
||||
case ":":
|
||||
if (stream.eat(":")) {
|
||||
if (stream.eat(":"))
|
||||
return chain(inBlock("comment", "::"));
|
||||
}
|
||||
break;
|
||||
case "^": //box
|
||||
return chain(inBlock("tw-box", "^"));
|
||||
break;
|
||||
case "~": //np
|
||||
if (stream.match("np~")) {
|
||||
if (stream.match("np~"))
|
||||
return chain(inBlock("meta", "~/np~"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue