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/toml
File: toml.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"));
[5] Fix | Delete
else if (typeof define == "function" && define.amd) // AMD
[6] Fix | Delete
define(["../../lib/codemirror"], mod);
[7] Fix | Delete
else // Plain browser env
[8] Fix | Delete
mod(CodeMirror);
[9] Fix | Delete
})(function(CodeMirror) {
[10] Fix | Delete
"use strict";
[11] Fix | Delete
[12] Fix | Delete
CodeMirror.defineMode("toml", function () {
[13] Fix | Delete
return {
[14] Fix | Delete
startState: function () {
[15] Fix | Delete
return {
[16] Fix | Delete
inString: false,
[17] Fix | Delete
stringType: "",
[18] Fix | Delete
lhs: true,
[19] Fix | Delete
inArray: 0
[20] Fix | Delete
};
[21] Fix | Delete
},
[22] Fix | Delete
token: function (stream, state) {
[23] Fix | Delete
//check for state changes
[24] Fix | Delete
if (!state.inString && ((stream.peek() == '"') || (stream.peek() == "'"))) {
[25] Fix | Delete
state.stringType = stream.peek();
[26] Fix | Delete
stream.next(); // Skip quote
[27] Fix | Delete
state.inString = true; // Update state
[28] Fix | Delete
}
[29] Fix | Delete
if (stream.sol() && state.inArray === 0) {
[30] Fix | Delete
state.lhs = true;
[31] Fix | Delete
}
[32] Fix | Delete
//return state
[33] Fix | Delete
if (state.inString) {
[34] Fix | Delete
while (state.inString && !stream.eol()) {
[35] Fix | Delete
if (stream.peek() === state.stringType) {
[36] Fix | Delete
stream.next(); // Skip quote
[37] Fix | Delete
state.inString = false; // Clear flag
[38] Fix | Delete
} else if (stream.peek() === '\\') {
[39] Fix | Delete
stream.next();
[40] Fix | Delete
stream.next();
[41] Fix | Delete
} else {
[42] Fix | Delete
stream.match(/^.[^\\\"\']*/);
[43] Fix | Delete
}
[44] Fix | Delete
}
[45] Fix | Delete
return state.lhs ? "property string" : "string"; // Token style
[46] Fix | Delete
} else if (state.inArray && stream.peek() === ']') {
[47] Fix | Delete
stream.next();
[48] Fix | Delete
state.inArray--;
[49] Fix | Delete
return 'bracket';
[50] Fix | Delete
} else if (state.lhs && stream.peek() === '[' && stream.skipTo(']')) {
[51] Fix | Delete
stream.next();//skip closing ]
[52] Fix | Delete
// array of objects has an extra open & close []
[53] Fix | Delete
if (stream.peek() === ']') stream.next();
[54] Fix | Delete
return "atom";
[55] Fix | Delete
} else if (stream.peek() === "#") {
[56] Fix | Delete
stream.skipToEnd();
[57] Fix | Delete
return "comment";
[58] Fix | Delete
} else if (stream.eatSpace()) {
[59] Fix | Delete
return null;
[60] Fix | Delete
} else if (state.lhs && stream.eatWhile(function (c) { return c != '=' && c != ' '; })) {
[61] Fix | Delete
return "property";
[62] Fix | Delete
} else if (state.lhs && stream.peek() === "=") {
[63] Fix | Delete
stream.next();
[64] Fix | Delete
state.lhs = false;
[65] Fix | Delete
return null;
[66] Fix | Delete
} else if (!state.lhs && stream.match(/^\d\d\d\d[\d\-\:\.T]*Z/)) {
[67] Fix | Delete
return 'atom'; //date
[68] Fix | Delete
} else if (!state.lhs && (stream.match('true') || stream.match('false'))) {
[69] Fix | Delete
return 'atom';
[70] Fix | Delete
} else if (!state.lhs && stream.peek() === '[') {
[71] Fix | Delete
state.inArray++;
[72] Fix | Delete
stream.next();
[73] Fix | Delete
return 'bracket';
[74] Fix | Delete
} else if (!state.lhs && stream.match(/^\-?\d+(?:\.\d+)?/)) {
[75] Fix | Delete
return 'number';
[76] Fix | Delete
} else if (!stream.eatSpace()) {
[77] Fix | Delete
stream.next();
[78] Fix | Delete
}
[79] Fix | Delete
return null;
[80] Fix | Delete
}
[81] Fix | Delete
};
[82] Fix | Delete
});
[83] Fix | Delete
[84] Fix | Delete
CodeMirror.defineMIME('text/x-toml', 'toml');
[85] Fix | Delete
[86] Fix | Delete
});
[87] Fix | Delete
[88] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function