2 var mode = CodeMirror.getMode({tabSize: 4}, "gfm");
3 function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
8 MT("emInWordUnderscore",
11 MT("emStrongUnderscore",
12 "[strong __][em&strong _foo__][em _] bar");
14 MT("fencedCodeBlocks",
21 MT("fencedCodeBlockModeSwitching",
22 "[comment ```javascript]",
28 MT("taskListAsterisk",
29 "[variable-2 * []] foo]", // Invalid; must have space or x between []
30 "[variable-2 * [ ]]bar]", // Invalid; must have space after ]
31 "[variable-2 * [x]]hello]", // Invalid; must have space after ]
32 "[variable-2 * ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
33 " [variable-3 * ][property [x]]][variable-3 foo]"); // Valid; can be nested
36 "[variable-2 + []] foo]", // Invalid; must have space or x between []
37 "[variable-2 + [ ]]bar]", // Invalid; must have space after ]
38 "[variable-2 + [x]]hello]", // Invalid; must have space after ]
39 "[variable-2 + ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
40 " [variable-3 + ][property [x]]][variable-3 foo]"); // Valid; can be nested
43 "[variable-2 - []] foo]", // Invalid; must have space or x between []
44 "[variable-2 - [ ]]bar]", // Invalid; must have space after ]
45 "[variable-2 - [x]]hello]", // Invalid; must have space after ]
46 "[variable-2 - ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
47 " [variable-3 - ][property [x]]][variable-3 foo]"); // Valid; can be nested
50 "[variable-2 1. []] foo]", // Invalid; must have space or x between []
51 "[variable-2 2. [ ]]bar]", // Invalid; must have space after ]
52 "[variable-2 3. [x]]hello]", // Invalid; must have space after ]
53 "[variable-2 4. ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
54 " [variable-3 1. ][property [x]]][variable-3 foo]"); // Valid; can be nested
57 "foo [link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] bar");
60 "foo [link be6a8cc] bar");
66 "foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd22 bar");
69 "foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cg2 bar");
72 "foo [link bar@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] hello");
75 "foo [link bar/hello@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] world");
84 "foo [link bar#1] hello");
87 "foo [link bar/hello#1] world");
90 "foo [link http://www.example.com/] bar");
92 MT("vanillaLinkPunctuation",
93 "foo [link http://www.example.com/]. bar");
95 MT("vanillaLinkExtension",
96 "foo [link http://www.example.com/index.html] bar");
100 "[tag foo] {[property color][operator :][keyword black];}",
101 "[comment ```][link http://www.example.com/]");
104 "[comment ``foo `bar` http://www.example.com/``] hello");
108 "[link http://www.example.com/]",
111 "[link http://www.example.com/]");