Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wp-file-.../lib/codemirr.../mode/tornado
File: tornado.js
// CodeMirror, copyright (c) by Marijn Haverbeke and others
[0] Fix | Delete
// Distributed under an MIT license: http://codemirror.net/LICENSE
[1] Fix | Delete
[2] Fix | Delete
(function(mod) {
[3] Fix | Delete
if (typeof exports == "object" && typeof module == "object") // CommonJS
[4] Fix | Delete
mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"),
[5] Fix | Delete
require("../../addon/mode/overlay"));
[6] Fix | Delete
else if (typeof define == "function" && define.amd) // AMD
[7] Fix | Delete
define(["../../lib/codemirror", "../htmlmixed/htmlmixed",
[8] Fix | Delete
"../../addon/mode/overlay"], mod);
[9] Fix | Delete
else // Plain browser env
[10] Fix | Delete
mod(CodeMirror);
[11] Fix | Delete
})(function(CodeMirror) {
[12] Fix | Delete
"use strict";
[13] Fix | Delete
[14] Fix | Delete
CodeMirror.defineMode("tornado:inner", function() {
[15] Fix | Delete
var keywords = ["and","as","assert","autoescape","block","break","class","comment","context",
[16] Fix | Delete
"continue","datetime","def","del","elif","else","end","escape","except",
[17] Fix | Delete
"exec","extends","false","finally","for","from","global","if","import","in",
[18] Fix | Delete
"include","is","json_encode","lambda","length","linkify","load","module",
[19] Fix | Delete
"none","not","or","pass","print","put","raise","raw","return","self","set",
[20] Fix | Delete
"squeeze","super","true","try","url_escape","while","with","without","xhtml_escape","yield"];
[21] Fix | Delete
keywords = new RegExp("^((" + keywords.join(")|(") + "))\\b");
[22] Fix | Delete
[23] Fix | Delete
function tokenBase (stream, state) {
[24] Fix | Delete
stream.eatWhile(/[^\{]/);
[25] Fix | Delete
var ch = stream.next();
[26] Fix | Delete
if (ch == "{") {
[27] Fix | Delete
if (ch = stream.eat(/\{|%|#/)) {
[28] Fix | Delete
state.tokenize = inTag(ch);
[29] Fix | Delete
return "tag";
[30] Fix | Delete
}
[31] Fix | Delete
}
[32] Fix | Delete
}
[33] Fix | Delete
function inTag (close) {
[34] Fix | Delete
if (close == "{") {
[35] Fix | Delete
close = "}";
[36] Fix | Delete
}
[37] Fix | Delete
return function (stream, state) {
[38] Fix | Delete
var ch = stream.next();
[39] Fix | Delete
if ((ch == close) && stream.eat("}")) {
[40] Fix | Delete
state.tokenize = tokenBase;
[41] Fix | Delete
return "tag";
[42] Fix | Delete
}
[43] Fix | Delete
if (stream.match(keywords)) {
[44] Fix | Delete
return "keyword";
[45] Fix | Delete
}
[46] Fix | Delete
return close == "#" ? "comment" : "string";
[47] Fix | Delete
};
[48] Fix | Delete
}
[49] Fix | Delete
return {
[50] Fix | Delete
startState: function () {
[51] Fix | Delete
return {tokenize: tokenBase};
[52] Fix | Delete
},
[53] Fix | Delete
token: function (stream, state) {
[54] Fix | Delete
return state.tokenize(stream, state);
[55] Fix | Delete
}
[56] Fix | Delete
};
[57] Fix | Delete
});
[58] Fix | Delete
[59] Fix | Delete
CodeMirror.defineMode("tornado", function(config) {
[60] Fix | Delete
var htmlBase = CodeMirror.getMode(config, "text/html");
[61] Fix | Delete
var tornadoInner = CodeMirror.getMode(config, "tornado:inner");
[62] Fix | Delete
return CodeMirror.overlayMode(htmlBase, tornadoInner);
[63] Fix | Delete
});
[64] Fix | Delete
[65] Fix | Delete
CodeMirror.defineMIME("text/x-tornado", "tornado");
[66] Fix | Delete
});
[67] Fix | Delete
[68] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function