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/gfm
File: test.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() {
[3] Fix | Delete
var mode = CodeMirror.getMode({tabSize: 4}, "gfm");
[4] Fix | Delete
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
[5] Fix | Delete
var modeHighlightFormatting = CodeMirror.getMode({tabSize: 4}, {name: "gfm", highlightFormatting: true});
[6] Fix | Delete
function FT(name) { test.mode(name, modeHighlightFormatting, Array.prototype.slice.call(arguments, 1)); }
[7] Fix | Delete
[8] Fix | Delete
FT("codeBackticks",
[9] Fix | Delete
"[comment&formatting&formatting-code `][comment foo][comment&formatting&formatting-code `]");
[10] Fix | Delete
[11] Fix | Delete
FT("doubleBackticks",
[12] Fix | Delete
"[comment&formatting&formatting-code ``][comment foo ` bar][comment&formatting&formatting-code ``]");
[13] Fix | Delete
[14] Fix | Delete
FT("codeBlock",
[15] Fix | Delete
"[comment&formatting&formatting-code-block ```css]",
[16] Fix | Delete
"[tag foo]",
[17] Fix | Delete
"[comment&formatting&formatting-code-block ```]");
[18] Fix | Delete
[19] Fix | Delete
FT("taskList",
[20] Fix | Delete
"[variable-2&formatting&formatting-list&formatting-list-ul - ][meta&formatting&formatting-task [ ]]][variable-2 foo]",
[21] Fix | Delete
"[variable-2&formatting&formatting-list&formatting-list-ul - ][property&formatting&formatting-task [x]]][variable-2 foo]");
[22] Fix | Delete
[23] Fix | Delete
FT("formatting_strikethrough",
[24] Fix | Delete
"[strikethrough&formatting&formatting-strikethrough ~~][strikethrough foo][strikethrough&formatting&formatting-strikethrough ~~]");
[25] Fix | Delete
[26] Fix | Delete
FT("formatting_strikethrough",
[27] Fix | Delete
"foo [strikethrough&formatting&formatting-strikethrough ~~][strikethrough bar][strikethrough&formatting&formatting-strikethrough ~~]");
[28] Fix | Delete
[29] Fix | Delete
MT("emInWordAsterisk",
[30] Fix | Delete
"foo[em *bar*]hello");
[31] Fix | Delete
[32] Fix | Delete
MT("emInWordUnderscore",
[33] Fix | Delete
"foo_bar_hello");
[34] Fix | Delete
[35] Fix | Delete
MT("emStrongUnderscore",
[36] Fix | Delete
"[strong __][em&strong _foo__][em _] bar");
[37] Fix | Delete
[38] Fix | Delete
MT("fencedCodeBlocks",
[39] Fix | Delete
"[comment ```]",
[40] Fix | Delete
"[comment foo]",
[41] Fix | Delete
"",
[42] Fix | Delete
"[comment ```]",
[43] Fix | Delete
"bar");
[44] Fix | Delete
[45] Fix | Delete
MT("fencedCodeBlockModeSwitching",
[46] Fix | Delete
"[comment ```javascript]",
[47] Fix | Delete
"[variable foo]",
[48] Fix | Delete
"",
[49] Fix | Delete
"[comment ```]",
[50] Fix | Delete
"bar");
[51] Fix | Delete
[52] Fix | Delete
MT("fencedCodeBlockModeSwitchingObjc",
[53] Fix | Delete
"[comment ```objective-c]",
[54] Fix | Delete
"[keyword @property] [variable NSString] [operator *] [variable foo];",
[55] Fix | Delete
"[comment ```]",
[56] Fix | Delete
"bar");
[57] Fix | Delete
[58] Fix | Delete
MT("fencedCodeBlocksNoTildes",
[59] Fix | Delete
"~~~",
[60] Fix | Delete
"foo",
[61] Fix | Delete
"~~~");
[62] Fix | Delete
[63] Fix | Delete
MT("taskListAsterisk",
[64] Fix | Delete
"[variable-2 * []] foo]", // Invalid; must have space or x between []
[65] Fix | Delete
"[variable-2 * [ ]]bar]", // Invalid; must have space after ]
[66] Fix | Delete
"[variable-2 * [x]]hello]", // Invalid; must have space after ]
[67] Fix | Delete
"[variable-2 * ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
[68] Fix | Delete
" [variable-3 * ][property [x]]][variable-3 foo]"); // Valid; can be nested
[69] Fix | Delete
[70] Fix | Delete
MT("taskListPlus",
[71] Fix | Delete
"[variable-2 + []] foo]", // Invalid; must have space or x between []
[72] Fix | Delete
"[variable-2 + [ ]]bar]", // Invalid; must have space after ]
[73] Fix | Delete
"[variable-2 + [x]]hello]", // Invalid; must have space after ]
[74] Fix | Delete
"[variable-2 + ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
[75] Fix | Delete
" [variable-3 + ][property [x]]][variable-3 foo]"); // Valid; can be nested
[76] Fix | Delete
[77] Fix | Delete
MT("taskListDash",
[78] Fix | Delete
"[variable-2 - []] foo]", // Invalid; must have space or x between []
[79] Fix | Delete
"[variable-2 - [ ]]bar]", // Invalid; must have space after ]
[80] Fix | Delete
"[variable-2 - [x]]hello]", // Invalid; must have space after ]
[81] Fix | Delete
"[variable-2 - ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
[82] Fix | Delete
" [variable-3 - ][property [x]]][variable-3 foo]"); // Valid; can be nested
[83] Fix | Delete
[84] Fix | Delete
MT("taskListNumber",
[85] Fix | Delete
"[variable-2 1. []] foo]", // Invalid; must have space or x between []
[86] Fix | Delete
"[variable-2 2. [ ]]bar]", // Invalid; must have space after ]
[87] Fix | Delete
"[variable-2 3. [x]]hello]", // Invalid; must have space after ]
[88] Fix | Delete
"[variable-2 4. ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
[89] Fix | Delete
" [variable-3 1. ][property [x]]][variable-3 foo]"); // Valid; can be nested
[90] Fix | Delete
[91] Fix | Delete
MT("SHA",
[92] Fix | Delete
"foo [link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] bar");
[93] Fix | Delete
[94] Fix | Delete
MT("SHAEmphasis",
[95] Fix | Delete
"[em *foo ][em&link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]");
[96] Fix | Delete
[97] Fix | Delete
MT("shortSHA",
[98] Fix | Delete
"foo [link be6a8cc] bar");
[99] Fix | Delete
[100] Fix | Delete
MT("tooShortSHA",
[101] Fix | Delete
"foo be6a8c bar");
[102] Fix | Delete
[103] Fix | Delete
MT("longSHA",
[104] Fix | Delete
"foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd22 bar");
[105] Fix | Delete
[106] Fix | Delete
MT("badSHA",
[107] Fix | Delete
"foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cg2 bar");
[108] Fix | Delete
[109] Fix | Delete
MT("userSHA",
[110] Fix | Delete
"foo [link bar@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] hello");
[111] Fix | Delete
[112] Fix | Delete
MT("userSHAEmphasis",
[113] Fix | Delete
"[em *foo ][em&link bar@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]");
[114] Fix | Delete
[115] Fix | Delete
MT("userProjectSHA",
[116] Fix | Delete
"foo [link bar/hello@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] world");
[117] Fix | Delete
[118] Fix | Delete
MT("userProjectSHAEmphasis",
[119] Fix | Delete
"[em *foo ][em&link bar/hello@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]");
[120] Fix | Delete
[121] Fix | Delete
MT("num",
[122] Fix | Delete
"foo [link #1] bar");
[123] Fix | Delete
[124] Fix | Delete
MT("numEmphasis",
[125] Fix | Delete
"[em *foo ][em&link #1][em *]");
[126] Fix | Delete
[127] Fix | Delete
MT("badNum",
[128] Fix | Delete
"foo #1bar hello");
[129] Fix | Delete
[130] Fix | Delete
MT("userNum",
[131] Fix | Delete
"foo [link bar#1] hello");
[132] Fix | Delete
[133] Fix | Delete
MT("userNumEmphasis",
[134] Fix | Delete
"[em *foo ][em&link bar#1][em *]");
[135] Fix | Delete
[136] Fix | Delete
MT("userProjectNum",
[137] Fix | Delete
"foo [link bar/hello#1] world");
[138] Fix | Delete
[139] Fix | Delete
MT("userProjectNumEmphasis",
[140] Fix | Delete
"[em *foo ][em&link bar/hello#1][em *]");
[141] Fix | Delete
[142] Fix | Delete
MT("vanillaLink",
[143] Fix | Delete
"foo [link http://www.example.com/] bar");
[144] Fix | Delete
[145] Fix | Delete
MT("vanillaLinkNoScheme",
[146] Fix | Delete
"foo [link www.example.com] bar");
[147] Fix | Delete
[148] Fix | Delete
MT("vanillaLinkHttps",
[149] Fix | Delete
"foo [link https://www.example.com/] bar");
[150] Fix | Delete
[151] Fix | Delete
MT("vanillaLinkDataSchema",
[152] Fix | Delete
"foo [link data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==] bar");
[153] Fix | Delete
[154] Fix | Delete
MT("vanillaLinkPunctuation",
[155] Fix | Delete
"foo [link http://www.example.com/]. bar");
[156] Fix | Delete
[157] Fix | Delete
MT("vanillaLinkExtension",
[158] Fix | Delete
"foo [link http://www.example.com/index.html] bar");
[159] Fix | Delete
[160] Fix | Delete
MT("vanillaLinkEmphasis",
[161] Fix | Delete
"foo [em *][em&link http://www.example.com/index.html][em *] bar");
[162] Fix | Delete
[163] Fix | Delete
MT("notALink",
[164] Fix | Delete
"foo asfd:asdf bar");
[165] Fix | Delete
[166] Fix | Delete
MT("notALink",
[167] Fix | Delete
"[comment ```css]",
[168] Fix | Delete
"[tag foo] {[property color]:[keyword black];}",
[169] Fix | Delete
"[comment ```][link http://www.example.com/]");
[170] Fix | Delete
[171] Fix | Delete
MT("notALink",
[172] Fix | Delete
"[comment ``foo `bar` http://www.example.com/``] hello");
[173] Fix | Delete
[174] Fix | Delete
MT("notALink",
[175] Fix | Delete
"[comment `foo]",
[176] Fix | Delete
"[comment&link http://www.example.com/]",
[177] Fix | Delete
"[comment `] foo",
[178] Fix | Delete
"",
[179] Fix | Delete
"[link http://www.example.com/]");
[180] Fix | Delete
[181] Fix | Delete
MT("headerCodeBlockGithub",
[182] Fix | Delete
"[header&header-1 # heading]",
[183] Fix | Delete
"",
[184] Fix | Delete
"[comment ```]",
[185] Fix | Delete
"[comment code]",
[186] Fix | Delete
"[comment ```]",
[187] Fix | Delete
"",
[188] Fix | Delete
"Commit: [link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2]",
[189] Fix | Delete
"Issue: [link #1]",
[190] Fix | Delete
"Link: [link http://www.example.com/]");
[191] Fix | Delete
[192] Fix | Delete
MT("strikethrough",
[193] Fix | Delete
"[strikethrough ~~foo~~]");
[194] Fix | Delete
[195] Fix | Delete
MT("strikethroughWithStartingSpace",
[196] Fix | Delete
"~~ foo~~");
[197] Fix | Delete
[198] Fix | Delete
MT("strikethroughUnclosedStrayTildes",
[199] Fix | Delete
"[strikethrough ~~foo~~~]");
[200] Fix | Delete
[201] Fix | Delete
MT("strikethroughUnclosedStrayTildes",
[202] Fix | Delete
"[strikethrough ~~foo ~~]");
[203] Fix | Delete
[204] Fix | Delete
MT("strikethroughUnclosedStrayTildes",
[205] Fix | Delete
"[strikethrough ~~foo ~~ bar]");
[206] Fix | Delete
[207] Fix | Delete
MT("strikethroughUnclosedStrayTildes",
[208] Fix | Delete
"[strikethrough ~~foo ~~ bar~~]hello");
[209] Fix | Delete
[210] Fix | Delete
MT("strikethroughOneLetter",
[211] Fix | Delete
"[strikethrough ~~a~~]");
[212] Fix | Delete
[213] Fix | Delete
MT("strikethroughWrapped",
[214] Fix | Delete
"[strikethrough ~~foo]",
[215] Fix | Delete
"[strikethrough foo~~]");
[216] Fix | Delete
[217] Fix | Delete
MT("strikethroughParagraph",
[218] Fix | Delete
"[strikethrough ~~foo]",
[219] Fix | Delete
"",
[220] Fix | Delete
"foo[strikethrough ~~bar]");
[221] Fix | Delete
[222] Fix | Delete
MT("strikethroughEm",
[223] Fix | Delete
"[strikethrough ~~foo][em&strikethrough *bar*][strikethrough ~~]");
[224] Fix | Delete
[225] Fix | Delete
MT("strikethroughEm",
[226] Fix | Delete
"[em *][em&strikethrough ~~foo~~][em *]");
[227] Fix | Delete
[228] Fix | Delete
MT("strikethroughStrong",
[229] Fix | Delete
"[strikethrough ~~][strong&strikethrough **foo**][strikethrough ~~]");
[230] Fix | Delete
[231] Fix | Delete
MT("strikethroughStrong",
[232] Fix | Delete
"[strong **][strong&strikethrough ~~foo~~][strong **]");
[233] Fix | Delete
[234] Fix | Delete
})();
[235] Fix | Delete
[236] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function