From 3a754133dbc138390503341fd2e9beba3e43aa4b Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 27 Jan 2012 12:05:17 -0800 Subject: Merged old FileIO --- js/codemirror/lib/runmode.js | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 js/codemirror/lib/runmode.js (limited to 'js/codemirror/lib/runmode.js') diff --git a/js/codemirror/lib/runmode.js b/js/codemirror/lib/runmode.js deleted file mode 100644 index 163e720c..00000000 --- a/js/codemirror/lib/runmode.js +++ /dev/null @@ -1,27 +0,0 @@ -CodeMirror.runMode = function(string, modespec, callback) { - var mode = CodeMirror.getMode({indentUnit: 2}, modespec); - var isNode = callback.nodeType == 1; - if (isNode) { - var node = callback, accum = []; - callback = function(string, style) { - if (string == "\n") - accum.push("
"); - else if (style) - accum.push("" + CodeMirror.htmlEscape(string) + ""); - else - accum.push(CodeMirror.htmlEscape(string)); - } - } - var lines = CodeMirror.splitLines(string), state = CodeMirror.startState(mode); - for (var i = 0, e = lines.length; i < e; ++i) { - if (i) callback("\n"); - var stream = new CodeMirror.StringStream(lines[i]); - while (!stream.eol()) { - var style = mode.token(stream, state); - callback(stream.current(), style); - stream.start = stream.pos; - } - } - if (isNode) - node.innerHTML = accum.join(""); -}; -- cgit v1.2.3