diff options
author | Wu Cheng-Han | 2015-07-04 11:31:01 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2015-07-04 11:31:01 +0800 |
commit | 01685c255fda6e13f1cd2980130d2e388d52125c (patch) | |
tree | c329610e7011c0d77c55ef54f371181aeb362d13 /public/vendor/codemirror/mode/tiki | |
parent | 1d843c8ac257d512a96cf054ab24e6a3c2f34e26 (diff) |
Updated codemirror to 5.4.0
Diffstat (limited to 'public/vendor/codemirror/mode/tiki')
-rwxr-xr-x | public/vendor/codemirror/mode/tiki/tiki.js | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/public/vendor/codemirror/mode/tiki/tiki.js b/public/vendor/codemirror/mode/tiki/tiki.js index c90aac9e..5e05b1ff 100755 --- a/public/vendor/codemirror/mode/tiki/tiki.js +++ b/public/vendor/codemirror/mode/tiki/tiki.js @@ -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; } |