[
	{
		"desc": "Simple paragraph",
		"wikitext": "This is a simple paragraph.",
		"nodes": []
	},
	{
		"desc": "Paragraphs with extra newline spacing",
		"wikitext": "a\n\nb (+2 nls)\n\n\nc (+3 nls)\n\n\n\nd (+4 nls)\n\n\n\n\ne (+5 nls)",
		"nodes": []
	},
	{
		"desc": "Paragraphs with newline spacing with comment lines in between",
		"wikitext": "----\na\n<!--foo-->\nb\n----\na\n<!--foo--><!--More than 1 comment, still stripped-->\nb\n----\na\n <!--foo--> <!----> <!-- bar --> \nb\n----\na\n<!--foo-->\n\nb\n----\na\n\n<!--foo-->\nb\n----\na\n<!--foo-->\n\n\nb\n----\na\n\n\n<!--foo-->\nb\n----",
		"nodes": [
			{
				"text": "----",
				"name": "contentSeparator"
			},
			{
				"text": "<!--foo-->",
				"name": "comment"
			},
			{
				"text": "----",
				"name": "contentSeparator"
			},
			{
				"text": "<!--foo--><!--More than 1 comment, still stripped-->",
				"name": "comment"
			},
			{
				"text": "----",
				"name": "contentSeparator"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<!--foo-->",
				"name": "comment"
			},
			{
				"text": "<!---->",
				"name": "comment"
			},
			{
				"text": "<!-- bar -->",
				"name": "comment"
			},
			{
				"text": "----",
				"name": "contentSeparator"
			},
			{
				"text": "<!--foo-->",
				"name": "comment"
			},
			{
				"text": "----",
				"name": "contentSeparator"
			},
			{
				"text": "<!--foo-->",
				"name": "comment"
			},
			{
				"text": "----",
				"name": "contentSeparator"
			},
			{
				"text": "<!--foo-->",
				"name": "comment"
			},
			{
				"text": "----",
				"name": "contentSeparator"
			},
			{
				"text": "<!--foo-->",
				"name": "comment"
			},
			{
				"text": "----",
				"name": "contentSeparator"
			}
		]
	},
	{
		"desc": "Paragraphs with newline spacing with non-empty white-space lines in between",
		"wikitext": "----\na\n \nb\n----\na\n \n \nb\n----",
		"nodes": [
			{
				"text": "----",
				"name": "contentSeparator"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "----",
				"name": "contentSeparator"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "----",
				"name": "contentSeparator"
			}
		]
	},
	{
		"desc": "Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between",
		"wikitext": "----\na\n <!--foo-->\nb\n----\na\n <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->\nb\n----\na\n \n<!--foo-->\n <!--bar-->\nb\n----\na\n \n <!--foo-->\n <!--bar-->\n \nb\n----",
		"nodes": [
			{
				"text": "----",
				"name": "contentSeparator"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<!--foo-->",
				"name": "comment"
			},
			{
				"text": "----",
				"name": "contentSeparator"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->",
				"name": "comment"
			},
			{
				"text": "----",
				"name": "contentSeparator"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<!--foo-->",
				"name": "comment"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<!--bar-->",
				"name": "comment"
			},
			{
				"text": "----",
				"name": "contentSeparator"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<!--foo-->",
				"name": "comment"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<!--bar-->",
				"name": "comment"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "----",
				"name": "contentSeparator"
			}
		]
	},
	{
		"desc": "Extra newlines: More paragraphs with indented comment",
		"wikitext": "a\n\n   <!--boo-->\n\nb",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<!--boo-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Extra new lines before and after lists are preserved",
		"wikitext": "a\n\n\n*b\n\n\nc",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Multiple newlines after tables are converted to p-br-p tags",
		"wikitext": "{|\n|x\n|}\n\n\n\n\n=b=",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Parsing an URL",
		"wikitext": "http://fr.wikipedia.org/wiki/🍺\n<!-- EasterEgg we love beer, better be able be able to link to it -->",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "fr.wikipedia.org/wiki/🍺",
				"name": "mw-free-extlink"
			},
			{
				"text": "<!-- EasterEgg we love beer, better be able be able to link to it -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Simple list",
		"wikitext": "*Item 1\n*Item 2",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Non-html5 tags should be accepted",
		"wikitext": "<center>''foo''</center>\n<big>''foo''</big>\n<font style=\"123\">''foo''</font>\n<strike>''foo''</strike>\n<tt>''foo''</tt>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "center",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "center",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "big",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "big",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "font ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"123\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "font",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "strike",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "strike",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "tt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "tt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "<wbr> is valid wikitext (T54468)",
		"wikitext": "<wbr>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "wbr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "<s> or <strike> for strikethrough",
		"wikitext": "<strike>strike</strike>\n\n<s>s</s>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "strike",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "strike",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Text-level semantic html elements in wikitext",
		"wikitext": "<em>text</em>\n<strong>text</strong>\n<small>text</small>\n<s>text</s>\n<cite>text</cite>\n<q>text</q>\n<dfn>text</dfn>\n<abbr>text</abbr>\n<data>text</data>\n<time>text</time>\n<code>text</code>\n<var>text</var>\n<samp>text</samp>\n<kbd>text</kbd>\n<sub>text</sub>\n<u>text</u>\n<mark>text</mark>\n<ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>\n<bdi>text</bdi>\n<bdo>text</bdo>\n<span>text</span>\n<wbr />",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "em",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "em",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "strong",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "strong",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "cite",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "cite",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "q",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "q",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "dfn",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "dfn",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "abbr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "abbr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "data",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "data",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "time",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "time",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "code",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "code",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "var",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "var",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "samp",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "samp",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "kbd",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "kbd",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "sub",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "sub",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "u",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "u",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "mark",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "mark",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ruby",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rp",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rp",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rp",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rp",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rtc",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rtc",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rp",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rp",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "ruby",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "bdi",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "bdi",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "bdo",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "bdo",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "wbr ",
				"name": "tagName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Ruby markup (W3C-style)",
		"wikitext": ";Mono-ruby for individual base characters\n:<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>\n;Group ruby\n:<ruby>今日<rt>きょう</rt></ruby>\n;Jukugo ruby\n:<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>\n;Inline ruby\n:<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>\n;Double-sided ruby\n:<ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>\n\n<ruby>\n<rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang=\"fr\"><rt>Cœur</rt></rtc>\n<rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang=\"fr\"><rt>Trèfle</rt></rtc>\n<rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang=\"fr\"><rt>Étoile</rt></rtc>\n</ruby>",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "Mono-ruby for individual base characters",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ruby",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "ruby",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "Group ruby",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ruby",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "ruby",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "Jukugo ruby",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ruby",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "ruby",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "Inline ruby",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ruby",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rp",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rp",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rp",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rp",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "ruby",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "Double-sided ruby",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ruby",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rtc",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rtc",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "ruby",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ruby",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rtc",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "rtc",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rtc ",
				"name": "tagName"
			},
			{
				"text": "lang=",
				"name": "attributeName"
			},
			{
				"text": "\"fr\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "rtc",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rtc",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "rtc",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rtc ",
				"name": "tagName"
			},
			{
				"text": "lang=",
				"name": "attributeName"
			},
			{
				"text": "\"fr\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "rtc",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rb",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rtc",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "rtc",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rtc ",
				"name": "tagName"
			},
			{
				"text": "lang=",
				"name": "attributeName"
			},
			{
				"text": "\"fr\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "rt",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "rtc",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "ruby",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Non-word characters don't terminate tag names (T19663, T42670, T54022)",
		"wikitext": "<blockquote|>a</blockquote>\n\n<b→> doesn't terminate </b→>\n\n<bä> doesn't terminate </bä>\n\n<boo> doesn't terminate </boo>\n\n<s.foo> doesn't terminate </s.foo>\n\n<sub-ID#1>",
		"nodes": [
			{
				"text": "</blockquote>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "Isolated close tags should be treated as literal text (T54760)",
		"wikitext": "</b>\n\n<s.foo>s</s>",
		"nodes": [
			{
				"text": "</b>",
				"name": "mw-error"
			},
			{
				"text": "</s>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "Self-closed tag hooks",
		"wikitext": "<pre />\n<gallery />\n<indicator name=\"something\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre ",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"something\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-indicator"
			}
		]
	},
	{
		"desc": "Bare pipe character (T54363)",
		"wikitext": "|",
		"nodes": []
	},
	{
		"desc": "Bare pipe character from a template (T54363)",
		"wikitext": "{{pipe}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "pipe",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Implicit newline insertion/sol when expanding templates (T241150/T14974/T2529)",
		"wikitext": "{{1x|#foo}}{{1x|#foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "#foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "#foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "<nowiki> unordered list",
		"wikitext": "<nowiki>* This is not an unordered list item.</nowiki>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "* This is not an unordered list item.",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "<nowiki> spacing",
		"wikitext": "<nowiki>Lorem ipsum dolor\n\nsed abit.\n  sed nullum.\n\n:and a colon\n</nowiki>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "Lorem ipsum dolor",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "sed abit.",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "  sed nullum.",
				"name": "mw-tag-nowiki"
			},
			{
				"text": ":and a colon",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Don't parse <nowiki><span class=\"error\"></nowiki> (T149622)",
		"wikitext": "<nowiki><span class=\"error\"></nowiki>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<span class=\"error\">",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "nowiki 3",
		"wikitext": ":There is not nowiki.\n:There is <nowiki>nowiki</nowiki>.\n\n#There is not nowiki.\n#There is <nowiki>nowiki</nowiki>.\n\n*There is not nowiki.\n*There is <nowiki>nowiki</nowiki>.",
		"nodes": [
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "#",
				"name": "list"
			},
			{
				"text": "#",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Entities inside <nowiki>",
		"wikitext": "<nowiki>&lt;</nowiki>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "&lt;",
				"name": "mw-tag-nowiki mw-html-entity"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Entities inside template parameters",
		"wikitext": "{{1x|&ndash;}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "&ndash;",
				"name": "mw-template-ground mw-html-entity"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T408631: Invalid templates inside template parameters",
		"wikitext": "{{1x|{{|foo}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Properly escape nowiki when combined with other wiki markup",
		"wikitext": "<nowiki>*</nowiki> <nowiki>&lt;/nowiki&gt;</nowiki> tag",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "*",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "&lt;",
				"name": "mw-tag-nowiki mw-html-entity"
			},
			{
				"text": "/nowiki",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "&gt;",
				"name": "mw-tag-nowiki mw-html-entity"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "T93824: Put escaped HTML tags inside nowiki",
		"wikitext": "<nowiki><h2>foo</h2></nowiki>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<h2>foo</h2>",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars",
		"wikitext": "This text: L'[[Foo]]\nThis text: L<nowiki>''</nowiki>[[Foo]]\nThis text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "'''",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "T71950: 2. Put nowiki as close to cause as possible, after ' :'",
		"wikitext": "This text : L<nowiki>''</nowiki>[[Foo]]",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T71482: Use {{!}} instead of nowiki for single pipe in template argument",
		"wikitext": "{{1x|foo{{!}}bar}}\n{{1x|<nowiki>foo|bar |[[</nowiki>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "foo|bar |[[",
				"name": "mw-template-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T53961: Output correct nowikis in template arguments",
		"wikitext": "{{1x|a [ b}}\n{{1x|<nowiki>a }} b</nowiki>}}\n{{1x|<nowiki>a [[ b</nowiki>}}\n{{1x|<nowiki>a | {{ ]]</nowiki>}}\n{{1x|a <nowiki>}</nowiki>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a [ b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "a }} b",
				"name": "mw-template-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "a [[ b",
				"name": "mw-template-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "a | {{ ]]",
				"name": "mw-template-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}",
				"name": "mw-template-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Cases where \"!!\" needs nowiki protection",
		"wikitext": "{|\n!<nowiki>this needs protection !! here</nowiki>\n|}\n\n{|\n!this does not need\nprotection !! here\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "this needs protection !! here",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "this does not need",
				"name": "mw-strong"
			},
			{
				"text": "protection ",
				"name": "mw-strong"
			},
			{
				"text": "!!",
				"name": "typeOperator"
			},
			{
				"text": " here",
				"name": "mw-strong"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Nowiki with newlines in list",
		"wikitext": ":<nowiki>test\n123</nowiki>",
		"nodes": [
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "test",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "123",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Nowiki and french spacing",
		"wikitext": "<nowiki>test : 123</nowiki>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "test : 123",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "T255007: French spacing in raw text elements",
		"wikitext": "<html>\n<script>test ; 123</script>\n<style>test : 123</style>\n</html>",
		"nodes": []
	},
	{
		"desc": "T406391: HTML entities in raw text elements",
		"wikitext": "<html>\n<script>console.log(\"&\");</script>\n<style>a::before { content: \"&\"; }</style>\n</html>\nA normal & should be encoded",
		"nodes": []
	},
	{
		"desc": "French spacing and spans",
		"wikitext": "[[Test]] : <span>123</span>\n« Test »<span>123</span>",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Test",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "post-expand include size being exceeded",
		"wikitext": "{{3x_on_newline|1234567890}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "3x_on_newline",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1234567890",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "max template depth being reached",
		"wikitext": "{{1x with depth|too deep!}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x with depth",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "too deep!",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "multiple templates that are redirects",
		"wikitext": "{{redirect to foo}}\n{{redirect to foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "redirect to foo",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "redirect to foo",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Transclusion with a (stripped) fragment",
		"wikitext": "{{Foo#bar}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Foo#bar",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T53086: Double newlines in blockquotes should be turned into paragraphs",
		"wikitext": "<blockquote>\nFoo\n\nBar\n</blockquote>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T17491: <ins>/<del> in blockquote",
		"wikitext": "<blockquote>\nFoo <del>bar</del> <ins>baz</ins> quux\n</blockquote>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "del",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "del",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ins",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "ins",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T17491: <ins>/<del> in blockquote (2)",
		"wikitext": "<blockquote>Foo <del>bar</del> <ins>baz</ins> quux\n</blockquote>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "del",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "del",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ins",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "ins",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Don't paragraph-wrap empty newlines between HTML list items",
		"wikitext": "<ol>\n<li>foo</li>\n\n\n\n<li>foo</li>\n</ol>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ol",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "ol",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: Strip leading and trailing whitespace from named-param values",
		"wikitext": "{{1x|1= a }}\n\n{{1x|1= {{1x|b}} }}\n\n{{1x| 1 =\n c }}\n\n{{1x| 1 =\n* d\n}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": " a ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": " ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "b",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": " ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "| ",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1 =",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": " c ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "| ",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1 =",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "* d",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Don't strip whitespace from positional-param values",
		"wikitext": "{{1x|a }}\n\n{{1x|{{1x|b}} }}\n\n{{1x| c \n}}\n\n{{1x| {{1x|d}}\n}}\n\n{{1x|\n e}}\n\n{{1x|\n*f}}\n\n{{1x|\n }}g",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "b",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": " ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "| ",
				"name": "mw-template-ground separator"
			},
			{
				"text": "c ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "| ",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "d",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": " e",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "*f",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": " ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Don't recognize targets split by newlines",
		"wikitext": "{{ech\no|foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "ech",
				"name": "mw-template-ground moduleKeyword"
			}
		]
	},
	{
		"desc": "Templates: Recognize targets when newlines and comments don't split the target",
		"wikitext": "{{  \n <!--X--> 1<!--X-->x<!--X-->  \n   <!--X-->   <!--X-->\n\n |foo}}",
		"nodes": [
			{
				"text": "{{  ",
				"name": "mw-template-ground bracket"
			},
			{
				"text": " <!--X-->",
				"name": "mw-template-ground comment"
			},
			{
				"text": " 1",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "<!--X-->",
				"name": "mw-template-ground comment"
			},
			{
				"text": "x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "<!--X-->",
				"name": "mw-template-ground comment"
			},
			{
				"text": "  ",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "   <!--X-->   <!--X-->",
				"name": "mw-template-ground comment"
			},
			{
				"text": " |",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Target with an extension tag",
		"wikitext": "{{{{1x|1x}}<nowiki>hi</nowiki>|ho}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "hi",
				"name": "mw-template-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "ho",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Handle empty comment-and-ws-only lines correctly",
		"wikitext": "{{1x|foo\n<!--should be ignored-->\n <!--should be ignored as well-->\nbar}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<!--should be ignored-->",
				"name": "mw-template-ground comment"
			},
			{
				"text": " ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<!--should be ignored as well-->",
				"name": "mw-template-ground comment"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Handle comments in the target",
		"wikitext": "{{1x\n<!-- should be ignored -->\n|foo}}\n\n{{1x\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n  |foo}}\n\n{{1x<!-- should be ignored -->\n|foo}}\n\n{{1x<!-- should be ignored -->|foo}}\n\n{{<!-- should be ignored -->1x|foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "<!-- should be ignored -->",
				"name": "mw-template-ground comment"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "<!-- should be ignored and spaces on next line should not trip us up (T147742) -->",
				"name": "mw-template-ground comment"
			},
			{
				"text": "  |",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "<!-- should be ignored -->",
				"name": "mw-template-ground comment"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "<!-- should be ignored -->",
				"name": "mw-template-ground comment"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<!-- should be ignored -->",
				"name": "mw-template-ground comment"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Handle comments in parameter names (T69657)",
		"wikitext": "{{1x|1\n<!-- should be ignored -->\n=foo}}\n\n{{1x|\n<!-- should be ignored -->\n1 = foo}}\n\n{{1x|1<!-- should be ignored -->=foo}}\n\n{{1x|<!-- should be ignored -->1=foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<!-- should be ignored -->",
				"name": "mw-template-ground comment"
			},
			{
				"text": "=foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<!-- should be ignored -->",
				"name": "mw-template-ground comment"
			},
			{
				"text": "1 =",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": " foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<!-- should be ignored -->",
				"name": "mw-template-ground comment"
			},
			{
				"text": "=foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<!-- should be ignored -->",
				"name": "mw-template-ground comment"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Other wikitext in parameter names (T69657)",
		"wikitext": "{{1x|''1''=foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "''1''=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: With colons",
		"wikitext": "{{With: Colon}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "With: Colon",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Parsoid parameter escaping test 1",
		"wikitext": "{{1x|[foo]|{{1x|[bar]}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[foo]",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "[bar]",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Parsoid: Pipes in external links in template parameter",
		"wikitext": "{{1x|[{{1x|http://example.com}} link]}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "http://example.com",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": " link]",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Parsoid: pipe in transclusion parameter",
		"wikitext": "{{1x|http://foo.com/a&#124;b}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "http://foo.com/a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "&#124;",
				"name": "mw-template-ground mw-html-entity"
			},
			{
				"text": "b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Parsoid: Pipe in external link target and content in template parameter",
		"wikitext": "{{1x|[http://foo.com/a&#124;b a&#124;b]}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[",
				"name": "mw-template-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-template-link-ground namespace"
			},
			{
				"text": "foo.com/a",
				"name": "mw-template-link-ground url"
			},
			{
				"text": "&#124;",
				"name": "mw-template-link-ground mw-html-entity"
			},
			{
				"text": "b",
				"name": "mw-template-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-template-link-ground"
			},
			{
				"text": "a",
				"name": "mw-template-link-ground labelName"
			},
			{
				"text": "&#124;",
				"name": "mw-template-link-ground mw-html-entity"
			},
			{
				"text": "b",
				"name": "mw-template-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-template-link-ground modifier"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)",
		"wikitext": "{{1x|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "fullurl",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-template-ext-ground punctuation"
			},
			{
				"text": "{{",
				"name": "mw-template-ext2-ground paren"
			},
			{
				"text": "FULLPAGENAME",
				"name": "mw-template-ext2-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext2-ground paren"
			},
			{
				"text": "|",
				"name": "mw-template-ext-ground punctuation"
			},
			{
				"text": "action=edit",
				"name": "mw-template-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": " bar]",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Don't escape already nowiki-escaped text in template parameters",
		"wikitext": "{{1x|foo<nowiki>|</nowiki>bar}}\n{{1x|<nowiki>&lt;div&gt;</nowiki>}}\n{{1x|<nowiki></nowiki>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "|",
				"name": "mw-template-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "&lt;",
				"name": "mw-template-ground mw-tag-nowiki mw-html-entity"
			},
			{
				"text": "div",
				"name": "mw-template-ground mw-tag-nowiki"
			},
			{
				"text": "&gt;",
				"name": "mw-template-ground mw-tag-nowiki mw-html-entity"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "></",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param",
		"wikitext": "{{1x|{{1x|1=bar}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template2-ground definitionKeyword"
			},
			{
				"text": "bar",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates parameters with special tokenizing behavior dont get modified because of arg escaping",
		"wikitext": "{{1x|a : b}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a : b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Preserve blank parameter names",
		"wikitext": "{{1x|=foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "=foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Preserve blank parameter names in other positions",
		"wikitext": "{{blank_param|bar|=foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "blank_param",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "=foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Broken wikilinks (but not external links) prevent templates from closing",
		"wikitext": "[http://example.com x\n\n{{1x|[http://example.com x}}\n\n[[Foo\n\n{{1x|[[Foo}}",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "x",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[",
				"name": "mw-template-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-template-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-template-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-template-link-ground"
			},
			{
				"text": "x}}",
				"name": "mw-template-link-ground labelName"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template2-link-ground squareBracket"
			},
			{
				"text": "Foo}}",
				"name": "mw-template2-link-ground mw-link-pagename mw-pagename"
			}
		]
	},
	{
		"desc": "Non-wikilinks should not be treated as broken wikilinks",
		"wikitext": "{{1x|[[1],[2]]}}\n\n{{1x|[[{}]]}}\n\n{{1x|[[1, [[2, 3]], 4]]}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "1],[2",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "{}",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "1, [[2, 3",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": ", 4]]",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Non-wikilinks with html tags in target position",
		"wikitext": "<table><td>[[</td><td>[[link]]</td><td>]]</td></table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "</td><td>[[link",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Wikilinks with embedded newlines are not broken",
		"wikitext": "{{1x|[[ Foo\nB\nC]]}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[ ",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "B",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "C]]",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Broken templates",
		"wikitext": "{{1x|[[Foo|}}]]\n\n[[Foo|{{1x|]]}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground operator"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground operator"
			},
			{
				"text": "{{",
				"name": "mw-template2-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-link-ground separator"
			},
			{
				"text": "]]",
				"name": "mw-template2-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-link-ground bracket"
			}
		]
	},
	{
		"desc": "Template returning pipe used in wikilink target",
		"wikitext": "[[{{pipe page}}]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "pipe page",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T4702: Mismatched <i>, <b> and <a> tags are invalid",
		"wikitext": "''[http://example.com text'']\n[http://example.com '''text]'''\n''Something [http://example.com in italic'']\n''Something [http://example.com mixed''''', even bold]'''\n'''''Now [http://example.com both''''']",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url mw-em"
			},
			{
				"text": " ",
				"name": "mw-link-ground mw-em"
			},
			{
				"text": "text",
				"name": "mw-link-ground labelName mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground character"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "'''",
				"name": "mw-link-ground character"
			},
			{
				"text": "text",
				"name": "mw-link-ground labelName mw-strong"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "Something ",
				"name": "mw-em"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url mw-em"
			},
			{
				"text": " ",
				"name": "mw-link-ground mw-em"
			},
			{
				"text": "in italic",
				"name": "mw-link-ground labelName mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground character"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "Something ",
				"name": "mw-em"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url mw-em"
			},
			{
				"text": " ",
				"name": "mw-link-ground mw-em"
			},
			{
				"text": "mixed",
				"name": "mw-link-ground labelName mw-em"
			},
			{
				"text": "'''''",
				"name": "mw-link-ground character"
			},
			{
				"text": ", even bold",
				"name": "mw-link-ground labelName mw-strong"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "Now ",
				"name": "mw-strong mw-em"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url mw-strong mw-em"
			},
			{
				"text": " ",
				"name": "mw-link-ground mw-strong mw-em"
			},
			{
				"text": "both",
				"name": "mw-link-ground labelName mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "mw-link-ground character"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Serialize <a> tags with invalid link targets as plain text",
		"wikitext": "text\n<nowiki>*</nowiki>text\n<nowiki>[[foo]]</nowiki>\n<nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "*",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[foo]]",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "*",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[foo]]",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "mw:ExtLink -vs- mw:WikiLink (T94723)",
		"wikitext": "[[Foo|Bar]]\n[[Foo|Bar]]\n[[:en:Foo|Bar]]\n[[:en:Foo|Bar]]\n\n[[:en:European_Robin|European Robin]]\n[[:en:European_Robin|European Robin]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":en:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":en:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":en:European_Robin",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "European Robin",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":en:European_Robin",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "European Robin",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Break on | in element attribute in template",
		"wikitext": "{{1x|1=<div class=\"hi|ho\">ha</div>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div ",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "class=",
				"name": "mw-template-ground attributeName"
			},
			{
				"text": "\"hi|ho\"",
				"name": "mw-template-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "ha",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Break on | in element attribute name in template",
		"wikitext": "{{1x|<div cla|ss=\"hiho\">ha</div>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div ",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "cla|ss=",
				"name": "mw-template-ground attributeName"
			},
			{
				"text": "\"hiho\"",
				"name": "mw-template-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "ha",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Plain link, capitalized",
		"wikitext": "[[Main Page]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Plain link, uncapitalized",
		"wikitext": "[[main Page]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Piped link",
		"wikitext": "[[Main Page|The Main Page]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "The Main Page",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Piped link with comment in link text",
		"wikitext": "[[Main Page|The Main<!--front--> Page]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "The Main",
				"name": "mw-link-ground string"
			},
			{
				"text": "<!--front-->",
				"name": "mw-link-ground comment"
			},
			{
				"text": " Page",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Piped link with multiple pipe characters in link text",
		"wikitext": "[[Main Page||The|Main|Page|]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "|The|Main|Page|",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Piped link with no link text",
		"wikitext": "[[Thomas Bek (bishop of St David's)|]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Thomas Bek (bishop of St David's)",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Piped link with empty link text",
		"wikitext": "[[Main Page|<nowiki/>]] - empty nowiki\n[[Main Page|&nbsp;]] - empty non breaking space",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "&nbsp;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Piped link with empty link text - 2",
		"wikitext": "[[Main Page| ]] - empty space",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "| ",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Broken link",
		"wikitext": "[[Zigzagzogzagzig]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Zigzagzogzagzig",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Broken link with fragment",
		"wikitext": "[[Zigzagzogzagzig#zug]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Zigzagzogzagzig",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "zug",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Special page link with fragment",
		"wikitext": "[[Special:Version#anchor]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Special:Version",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "anchor",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Nonexistent special page link with fragment",
		"wikitext": "[[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Special:ThisNameWillHopefullyNeverBeUsed",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "anchor",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link with prefix",
		"wikitext": "xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link with suffix",
		"wikitext": "[[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T45661: Piped links with identical prefixes",
		"wikitext": "[[prefixed article|prefixed articles with spaces]]\n\n[[prefixed article|prefixed articlesaoeu]]\n\n[[Main Page|Main Page test]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "prefixed article",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "prefixed articles with spaces",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "prefixed article",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "prefixed articlesaoeu",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Main Page test",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link with HTML entity in suffix / tail",
		"wikitext": "[[Main Page]]&quot;, [[Main Page]]&#97;",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "&quot;",
				"name": "mw-html-entity"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "&#97;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "Link with 3 brackets",
		"wikitext": "[[[Main Page]]]\nFoo [[[Main Page]]]",
		"nodes": []
	},
	{
		"desc": "Link with 4 brackets",
		"wikitext": "[[[[Main Page]]]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Piped link with 3 brackets",
		"wikitext": "[[[main page|the main page]]]",
		"nodes": []
	},
	{
		"desc": "Piped link with extlink-like text",
		"wikitext": "[[Main Page|[bar]]]\n[[Main Page|This is a [bar]]]\n[[Main Page|[bar]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "This is a [bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link with multiple pipes",
		"wikitext": "[[Main Page|The|Main|Page]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "The|Main|Page",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Anchor containing a #. (T65430)",
		"wikitext": "[[Main Page#And#Link]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "And#Link",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link to namespaces",
		"wikitext": "[[Talk:Parser testing]], [[Meta:Disclaimers]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Talk:Parser testing",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Meta:Disclaimers",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link with space in namespace",
		"wikitext": "[[User talk:Foo bar]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "User talk:Foo bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Namespace takes precedence over interwiki link (T53680)",
		"wikitext": "[[MemoryAlpha:AlphaTest]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "MemoryAlpha:AlphaTest",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link to namespace preferred over interwiki with correct rel attribute",
		"wikitext": "[[MemoryAlpha:AlphaTest]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "MemoryAlpha:AlphaTest",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Piped link to namespace",
		"wikitext": "[[Meta:Disclaimers|The disclaimers]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Meta:Disclaimers",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "The disclaimers",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link containing }",
		"wikitext": "[[Usually caused by a typo (oops}]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Usually caused by a typo (oops}",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link containing % (not as a hex sequence)",
		"wikitext": "[[7% Solution]]\n[[7% Solution|7%25 Solution]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "7% Solution",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "7% Solution",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "7%25 Solution",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link containing % as a single hex sequence interpreted to char",
		"wikitext": "[[7%25 Solution]]\n[[7%25 Solution|7%25 Solution]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "7%25 Solution",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "7%25 Solution",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "7%25 Solution",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link containing % as a double hex sequence interpreted to hex sequence",
		"wikitext": "[[7%2525 Solution]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "7%2525 Solution",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link containing \"#<\" and \"#>\" % as a hex sequences- these are valid section anchors",
		"wikitext": "[[%23%3c]][[%23%3e]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "%23%3c",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]][[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "%23%3e",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link containing \"#<\" and \"#>\" % as a hex sequences- these are valid section anchors (legacy)",
		"wikitext": "[[%23%3c]][[%23%3e]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "%23%3c",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]][[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "%23%3e",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link containing \"<#\" and \">#\" as a hex sequences",
		"wikitext": "[[%3c%23]][[%3e%23]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "%3c%23",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]][[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "%3e%23",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link containing an equals sign",
		"wikitext": "[[Special:BookSources/isbn=4-00-026157-6]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Special:BookSources/isbn=4-00-026157-6",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link containing an ampersand",
		"wikitext": "[[Foo & bar]]\n\n[[Foo &amp; bar]]\n\n[[Foo &amp;amp; bar]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo & bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo ",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "&amp;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": " bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo ",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "&amp;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "amp; bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link containing a tilde",
		"wikitext": "[[Foo~bar]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo~bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link containing double-single-quotes '' (T6598)",
		"wikitext": "[[Lista d''e paise d''o munno]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Lista d''e paise d''o munno",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link containing double quotes and spaces",
		"wikitext": "[[Cool \"Gator\"]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Cool \"Gator\"",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link containing double-single-quotes '' in text (T6598 check)",
		"wikitext": "Some [[Link|pretty ''italics'' and stuff]]!",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Link",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "pretty ",
				"name": "mw-link-ground string"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "italics",
				"name": "mw-link-ground string mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": " and stuff",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link containing double-single-quotes '' in text embedded in italics (T6598 check)",
		"wikitext": "''Some [[Link|pretty ''italics'' and stuff]]!''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "Some ",
				"name": "mw-em"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Link",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-em"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "pretty ",
				"name": "mw-link-ground string mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "italics",
				"name": "mw-link-ground string mw-em mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": " and stuff",
				"name": "mw-link-ground string mw-em"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "!",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Link with double quotes in title part (literal) and alternate part (interpreted)",
		"wikitext": "[[File:Denys_Savchenko_''Pentecoste''.jpg]]\n\n[[''Pentecoste'']]\n\n[[''Pentecoste''|Pentecoste]]\n\n[[''Pentecoste''|''Pentecoste'']]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Denys_Savchenko_''Pentecoste''.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "''Pentecoste''",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "''Pentecoste''",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Pentecoste",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "''Pentecoste''",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "Pentecoste",
				"name": "mw-link-ground string mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Plain link to URL",
		"wikitext": "[[http://www.example.com]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "http://www.example.com",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Plain link to URL with link text",
		"wikitext": "[[http://www.example.com Link text]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "http://www.example.com Link text",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Plain link to URL containing special characters, with link text (see T213950).",
		"wikitext": "[[http://www.example.com/?q=%7Babc%7D Link text]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "http://www.example.com/?q=%7Babc%7D Link text",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Plain link to protocol-relative URL",
		"wikitext": "[[//www.example.com]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "//www.example.com",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Plain link to protocol-relative URL with link text",
		"wikitext": "[[//www.example.com Link text]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "//www.example.com Link text",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Plain link to page with question mark in title",
		"wikitext": "[[A?b]]\n\n[[A?b|Baz]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "A?b",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "A?b",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Baz",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Piped link to URL",
		"wikitext": "Piped link to URL: [[http://www.example.com|an example URL]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "http://www.example.com",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "an example URL",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Nested wikilink syntax in wikilink syntax that parses as wikilink in extlink",
		"wikitext": "[[http://example.com|[[Example]]]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "http://example.com",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Example",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Plain link in template argument",
		"wikitext": "{{1x|[http://www.example.com |123]}}\n\n{{1x|[[http://www.example.com |123]]}}\n\n{{1x|[[http://www.example.com |123]}}\n\n{{1x|[http://www.example.com |123]]}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[",
				"name": "mw-template-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-template-link-ground namespace"
			},
			{
				"text": "www.example.com",
				"name": "mw-template-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-template-link-ground"
			},
			{
				"text": "|123",
				"name": "mw-template-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-template-link-ground modifier"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "http://www.example.com ",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground operator"
			},
			{
				"text": "123",
				"name": "mw-template-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "http://www.example.com ",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground operator"
			},
			{
				"text": "123]}}",
				"name": "mw-template-link-ground string"
			},
			{
				"text": "{{",
				"name": "mw-template2-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-link-ground separator"
			},
			{
				"text": "[",
				"name": "mw-template2-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-template2-link-ground namespace"
			},
			{
				"text": "www.example.com",
				"name": "mw-template2-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-template2-link-ground"
			},
			{
				"text": "|123",
				"name": "mw-template2-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-template2-link-ground modifier"
			},
			{
				"text": "]",
				"name": "mw-template2-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-link-ground bracket"
			}
		]
	},
	{
		"desc": "T2002: [[page|http://url/]] should link to page, not http://url/",
		"wikitext": "[[Main Page|http://url/]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "http://url/",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T2337: Escaped self-links should be bold",
		"wikitext": "[[Bu&#103;462]] [[Bug462]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Bu",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "&#103;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "462",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Bug462",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Self-link to section should not be bold",
		"wikitext": "[[Main Page#section]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "section",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Self-link hash fragment should be escaped",
		"wikitext": "[[Main Page#section with spaces]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "section with spaces",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Self-link to numeric title",
		"wikitext": "[[0]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "0",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link to numeric-equivalent title",
		"wikitext": "[[00]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "00",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "<nowiki> inside a link",
		"wikitext": "[[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main<nowiki> Page</nowiki>",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "the main page ",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[it's not very good]",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "<pre> inside a link",
		"wikitext": "[[Main<pre> Page</pre>]] [[Main Page|the main page <pre>[it's not very good]</pre>]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main<pre> Page</pre>",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "the main page ",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-link-ground mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "[it's not very good]",
				"name": "mw-link-ground mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-link-ground mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Non-breaking spaces in title",
		"wikitext": "[[&nbsp; Main &nbsp; Page &nbsp;]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "&nbsp;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": " Main ",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "&nbsp;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": " Page ",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "&nbsp;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Multiple spaces in titles should normalize to a single underscore",
		"wikitext": "[[Foo bar baz|x]]\n[[Foo  bar baz|x]]\n[[Foo  bar   baz|x]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo bar baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "x",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo  bar baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "x",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo  bar   baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "x",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Internal link with en linktrail: no apostrophes (T29473)",
		"wikitext": "[[Something]]'nice",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Something",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link with multiple \":\" in a subpage-supporting namespace (T65636)",
		"wikitext": "[[User:Foo/Test/63636:Bar|Test]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "User:Foo/Test/63636:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Test",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Handle title parsing for subpages",
		"wikitext": "123",
		"nodes": []
	},
	{
		"desc": "Link to a subpage from a namespace other than main",
		"wikitext": "[[/123]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "/123",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Ensure that transclusion titles are not url-decoded",
		"wikitext": "{{Bar%C3%A9}} {{/Bar%C3%A9}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Bar%C3%A9",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "/Bar%C3%A9",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Purely hash wikilink",
		"wikitext": "[[#a|b]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "a",
				"name": "mw-link-ground className"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "b",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Purely hash wikilink on file page",
		"wikitext": "[[#a|b]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "a",
				"name": "mw-link-ground className"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "b",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Purely hash wikilink on category page",
		"wikitext": "[[#a|b]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "a",
				"name": "mw-link-ground className"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "b",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Serialization of purely hash wikilink",
		"wikitext": "[[#a|<nowiki>[[</nowiki>]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "a",
				"name": "mw-link-ground className"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "1. Interaction of linktrail and template encapsulation",
		"wikitext": "{{1x|[[Foo]]}}l\n\n{{1x|[[Foo]]l}}\n\n{{1x|[[Foo]]l}}s\n\n{{1x|[[Foo]]<span>ls</span>}}\n\n[[{{1x|Foo}}]]l",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "l",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "l",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "ls",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "Foo",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "2. Interaction of linktrail and template encapsulation",
		"wikitext": "{{1x|Some [[Fool]]}}s",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Some ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Fool",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "3. Interaction of linktrail and template encapsulation",
		"wikitext": "{{1x|Some [[Fool]]s are '''bold and foolish'''}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Some ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Fool",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "s are '''bold and foolish'''",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Parsoid link trail escaping",
		"wikitext": "[[apple]]<nowiki/>s",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "apple",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Parsoid link bracket escaping",
		"wikitext": "[[Test]]\n\n[<nowiki/>[[Test]]]\n\n[[[[Test]]]]\n\n[[[<nowiki/>[[Test]]]]]\n\n[[[[[[Test]]]]]]\n\n[[[[[<nowiki/>[[Test]]]]]]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Test",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Test",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Test",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Test",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Test",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Test",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved",
		"wikitext": "[[Foo|  bar]]\n\n[[Foo|  ''bar'']]\n\n[http://wp.org   foo]\n\n[http://wp.org   ''foo'']",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|  ",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|  ",
				"name": "mw-link-ground operator"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "wp.org",
				"name": "mw-link-ground url"
			},
			{
				"text": "   ",
				"name": "mw-link-ground"
			},
			{
				"text": "foo",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "wp.org",
				"name": "mw-link-ground url"
			},
			{
				"text": "   ",
				"name": "mw-link-ground"
			},
			{
				"text": "''",
				"name": "mw-link-ground character"
			},
			{
				"text": "foo",
				"name": "mw-link-ground labelName mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground character"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Parsoid: Scoped parsing should handle mixed transclusions and plain text",
		"wikitext": "[[Foo|{{1x|a}} b {{1x|c}}]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "a",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": " b ",
				"name": "mw-link-ground string"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "c",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link with angle bracket after anchor",
		"wikitext": "[[Foo#<bar>]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "<bar>",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link with angle bracket after anchor (legacy)",
		"wikitext": "[[Foo#<bar>]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "<bar>",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Wikilink in wikilink",
		"wikitext": "[[Hi|[[Ho]]]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Hi",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Ho",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Category in wikilink",
		"wikitext": "[[Hi|Ho[[Category:Hiho]]]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Hi",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Ho",
				"name": "mw-link-ground string"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Hiho",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid T55221: Wikilinks should be properly entity-escaped",
		"wikitext": "He&amp;nbsp;llo [[Foo|He&amp;nbsp;llo]]\n\nHe&amp;nbsp;llo He&amp;nbsp;llo",
		"nodes": [
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "He",
				"name": "mw-link-ground string"
			},
			{
				"text": "&amp;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "nbsp;llo",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "Wikilinks with : should roundtrip correctly, with and without redlinks",
		"wikitext": "[[16:30]]\n[[18:30]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "16:30",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "18:30",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid: handle constructor well",
		"wikitext": "[[constructor]]\n\n[[constructor:foo]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "constructor",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "constructor:foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Template parameter named \"constructor\"",
		"wikitext": "{{1x|  constructor =  |hi}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|  ",
				"name": "mw-template-ground separator"
			},
			{
				"text": "constructor =",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "  ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "hi",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "<br> to <br />",
		"wikitext": "1<br>2<br />3",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Broken br tag sanitization",
		"wikitext": "</br>",
		"nodes": [
			{
				"text": "</br>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "Parsoid: Broken br tag recognition",
		"wikitext": "</br>\n\n<br/ >",
		"nodes": [
			{
				"text": "</br>",
				"name": "mw-error"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br",
				"name": "tagName"
			},
			{
				"text": "/ ",
				"name": "attributeName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Incorrecly removing closing slashes from correctly formed XHTML",
		"wikitext": "<br style=\"clear:both;\" />",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"clear:both;\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " ",
				"name": "attributeName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Failing to transform badly formed HTML into correct XHTML",
		"wikitext": "<br style=\"clear: left;\">\n<br style=\"clear: right;\">\n<br style=\"clear: both;\">",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"clear: left;\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"clear: right;\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"clear: both;\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Handling html with a div self-closing tag",
		"wikitext": "<div title />\n<div title/>\n<div title/ >\n<div title=bar />\n<div title=bar/>\n<div title=bar/ >",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title ",
				"name": "attributeName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title",
				"name": "attributeName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title/ ",
				"name": "attributeName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "bar",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " ",
				"name": "attributeName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "bar",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "bar/",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " ",
				"name": "attributeName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Elements with solidus in various attribute positions",
		"wikitext": "<div cla/ss=\"123\">ha</div>\n\n<div / class=\"123\">ha</div>\n\n<div class= / \"123\">ha</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "cla/ss=",
				"name": "attributeName"
			},
			{
				"text": "\"123\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "/ class=",
				"name": "attributeName"
			},
			{
				"text": "\"123\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "class= ",
				"name": "attributeName"
			},
			{
				"text": "/",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " \"123\"",
				"name": "attributeName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Handling html with a br self-closing tag",
		"wikitext": "<br title />\n<br title/>\n<br title/ >\n<br title=bar />\n<br title=bar/>\n<br title=bar/ >",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "title ",
				"name": "attributeName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "title",
				"name": "attributeName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "title/ ",
				"name": "attributeName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "bar",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " ",
				"name": "attributeName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "bar",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "bar/",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " ",
				"name": "attributeName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Quoted attributes without spaces",
		"wikitext": "<div class=\"foo\"style=\"color:red\">red</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "class=",
				"name": "attributeName"
			},
			{
				"text": "\"foo\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"color:red\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Horizontal ruler (should it add that extra space?)",
		"wikitext": "<hr>\n<hr >\nfoo <hr\n> bar",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "hr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "hr ",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "hr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Horizontal ruler -- 4+ dashes render hr",
		"wikitext": "----",
		"nodes": [
			{
				"text": "----",
				"name": "contentSeparator"
			}
		]
	},
	{
		"desc": "Horizontal ruler -- eats additional dashes on the same line",
		"wikitext": "---------",
		"nodes": [
			{
				"text": "---------",
				"name": "contentSeparator"
			}
		]
	},
	{
		"desc": "Horizontal ruler -- does not collapse dashes on consecutive lines",
		"wikitext": "----\n----",
		"nodes": [
			{
				"text": "----",
				"name": "contentSeparator"
			},
			{
				"text": "----",
				"name": "contentSeparator"
			}
		]
	},
	{
		"desc": "Horizontal ruler -- <4 dashes render as plain text",
		"wikitext": "---",
		"nodes": []
	},
	{
		"desc": "Horizontal ruler -- Supports content following dashes on same line",
		"wikitext": "---- Foo",
		"nodes": [
			{
				"text": "----",
				"name": "contentSeparator"
			}
		]
	},
	{
		"desc": "Common list",
		"wikitext": "*Common list\n*item 2\n*item 3",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Numbered list",
		"wikitext": "#Numbered list\n#item 2\n#item 3",
		"nodes": [
			{
				"text": "#",
				"name": "list"
			},
			{
				"text": "#",
				"name": "list"
			},
			{
				"text": "#",
				"name": "list"
			}
		]
	},
	{
		"desc": "Mixed list",
		"wikitext": "*Mixed list\n*#with numbers\n**and bullets\n*#and numbers\n*bullets again\n**bullet level 2\n***bullet level 3\n***#Number on level 4\n**bullet level 2\n**#Number on level 3\n**#Number on level 3\n*#number level 2\n*Level 1\n***Level 3\n#**Level 3, but ordered",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*#",
				"name": "list"
			},
			{
				"text": "**",
				"name": "list"
			},
			{
				"text": "*#",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "**",
				"name": "list"
			},
			{
				"text": "***",
				"name": "list"
			},
			{
				"text": "***#",
				"name": "list"
			},
			{
				"text": "**",
				"name": "list"
			},
			{
				"text": "**#",
				"name": "list"
			},
			{
				"text": "**#",
				"name": "list"
			},
			{
				"text": "*#",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "***",
				"name": "list"
			},
			{
				"text": "#**",
				"name": "list"
			}
		]
	},
	{
		"desc": "1. Nested mixed wikitext and html list",
		"wikitext": "*hi\n*<ul><li>ho</li></ul>\n*hi\n**ho",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "**",
				"name": "list"
			}
		]
	},
	{
		"desc": "2. Nested mixed wikitext and html list (incompatible)",
		"wikitext": ";hi\n:{{1x|<li>ho</li>}}",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "hi",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "li",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "ho",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "li",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Nested lists 1",
		"wikitext": "*foo\n**bar",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "**",
				"name": "list"
			}
		]
	},
	{
		"desc": "Nested lists 2",
		"wikitext": "**foo\n*bar",
		"nodes": [
			{
				"text": "**",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Nested lists 3 (first element empty)",
		"wikitext": "*\n**bar",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "**",
				"name": "list"
			}
		]
	},
	{
		"desc": "Nested lists 4 (first element empty)",
		"wikitext": "**\n*bar",
		"nodes": [
			{
				"text": "**",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Nested lists 5 (both elements empty)",
		"wikitext": "**\n*",
		"nodes": [
			{
				"text": "**",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Nested lists 6 (both elements empty)",
		"wikitext": "*\n**",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "**",
				"name": "list"
			}
		]
	},
	{
		"desc": "Nested lists 7 (skip initial nesting levels)",
		"wikitext": "***foo",
		"nodes": [
			{
				"text": "***",
				"name": "list"
			}
		]
	},
	{
		"desc": "Nested lists 8 (multiple nesting transitions)",
		"wikitext": "*foo\n***bar\n**baz\n*boo",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "***",
				"name": "list"
			},
			{
				"text": "**",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Nested lists 10 (list and span siblings: wt2wt regression)",
		"wikitext": "*a <span>x</span>\n**b <span>y</span>",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "**",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Nested lists 11 (T262409: trailing whitespace & selser)",
		"wikitext": "**a\n***b",
		"nodes": [
			{
				"text": "**",
				"name": "list"
			},
			{
				"text": "***",
				"name": "list"
			}
		]
	},
	{
		"desc": "1. Lists and block-element interaction",
		"wikitext": "*<div>a\n*b\n</div>ಕ",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "2. Lists and block-element interaction",
		"wikitext": "*{{1x|<div>a\n*b\n}}</div>ಕ",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "*b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "1. Lists with start-of-line-transparent tokens before bullets: Comments",
		"wikitext": "*foo\n*<!--cmt-->bar\n<!--cmt-->*baz",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<!--cmt-->",
				"name": "comment"
			},
			{
				"text": "<!--cmt-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "2. Lists with start-of-line-transparent tokens before bullets: Template close",
		"wikitext": "*foo {{1x|bar\n}}*baz",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "List items are not parsed correctly following a <pre> block (T2785)",
		"wikitext": "*<pre>foo</pre>\n*<pre>bar</pre>\n*zar",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "foo",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "bar",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "List items from template",
		"wikitext": "{{inner list}}\n*item 2\n\n*item 0\n{{inner list}}\n*item 2\n\n*item 0\n*notSOL{{inner list}}\n*item 2",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "inner list",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "inner list",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "inner list",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "List interrupted by empty line or heading",
		"wikitext": "*foo\n\n**bar\n==A heading==\n*Another list item",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "**",
				"name": "list"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "A heading",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Multiple list tags generated by templates",
		"wikitext": "{{1x|<li>}}a\n{{1x|<li>}}b\n{{1x|<li>}}c",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "li",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "li",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "li",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Multiple newlines in between HTML list items don't induce paragraph wrapping",
		"wikitext": "<ul>\n<li>hi</li>\n\n\n\n\n<li>ho</li>\n</ul>\n\n<dl>\n<dt>hi</dt>\n<dd>ho<div>123</div>\n</dd>\n\n\n</dl>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "dl",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "dt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "dt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "dd",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "dd",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "dl",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines",
		"wikitext": "*a\n<!--This line will NOT split the list-->\n*b\n <!--This line will NOT split the list either-->\n*c\n <!--foo--> <!----> <!--This line NOT split the list either--> \n*d",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<!--This line will NOT split the list-->",
				"name": "comment"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<!--This line will NOT split the list either-->",
				"name": "comment"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<!--foo-->",
				"name": "comment"
			},
			{
				"text": "<!---->",
				"name": "comment"
			},
			{
				"text": "<!--This line NOT split the list either-->",
				"name": "comment"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Replacing whitespace with tabs still doesn't break the list (gerrit 78327)",
		"wikitext": "*a\n<!--This line will NOT split the list-->\t\n*b\n\t<!--This line will NOT split the list either--> \t\n*c\n\t<!--foo--> <!---->\t<!--This line NOT split the list\n        either-->\t \n*d",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<!--This line will NOT split the list-->",
				"name": "comment"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<!--This line will NOT split the list either-->",
				"name": "comment"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<!--foo-->",
				"name": "comment"
			},
			{
				"text": "<!---->",
				"name": "comment"
			},
			{
				"text": "<!--This line NOT split the list",
				"name": "comment"
			},
			{
				"text": "        either-->",
				"name": "comment"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)",
		"wikitext": "*foo\n*<li>li-hack\n**bar1\n*{{1x|<li>templated li-hack}}\n**bar2\n*<!--foo--><li> unsupported li-hack with preceding comments\n\n<ul>\n<li><li>not a li-hack\n</li>\n</ul>",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "**",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "li",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "templated li-hack",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "**",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<!--foo-->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</ul>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines",
		"wikitext": "#foo\n##bar\n\n*foo\n**bar\n\n:foo\n::bar",
		"nodes": [
			{
				"text": "#",
				"name": "list"
			},
			{
				"text": "##",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "**",
				"name": "list"
			},
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "::",
				"name": "list"
			}
		]
	},
	{
		"desc": "Parsoid: Test of whitespace serialization with Templated bullets",
		"wikitext": "* {{bullet}}",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "bullet",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Unbalanced closing block tags break a list",
		"wikitext": "<div>\n*a</div><div>\n*b</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Unbalanced closing wikitext block tags break a list",
		"wikitext": "<p>\n*a</p><p>\n*b</p>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Unbalanced closing non-block tags don't break a list",
		"wikitext": "<span>\n*a</span><span>\n*b</span>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T368721: Closing block tags not on the stack of open elements in lists",
		"wikitext": "<!-- block tag  -->\n*a</div>b\n\n<!-- wikitext block tag -->\n*a</p>b",
		"nodes": [
			{
				"text": "<!-- block tag  -->",
				"name": "comment"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "</div>",
				"name": "mw-error"
			},
			{
				"text": "<!-- wikitext block tag -->",
				"name": "comment"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "</p>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "Unclosed formatting tags that straddle lists are closed and reopened",
		"wikitext": "#<s> a\n#b </s>",
		"nodes": [
			{
				"text": "#",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "#",
				"name": "list"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "1. List embedded in a formatting tag",
		"wikitext": "<small>\n*foo\n</small>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "2. List embedded in a formatting tag in a misnested way",
		"wikitext": "<small>\n*a\n*b</small>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "3. List embedded in a formatting tag in a misnested way",
		"wikitext": "<small>\n\n** 123</small>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "**",
				"name": "list"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "4. Category at the end of a bare <li> list item",
		"wikitext": "<li>Broken list\n== Section ==\n* Proper list\n\n[[Category:Foo]]",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " Section ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid: unknown parser function (T314524)",
		"wikitext": "{{#tag:b|This is a known parser function}}\n\nNow show the unknown parser functions for comparison.\n\n{{#foo}}\n\n{{#foo:bar|bat}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "b",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "This is a known parser function",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#foo",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#foo",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "bar",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "bat",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Parsoid: Page property magic word with magic word contents",
		"wikitext": "{{DISPLAYTITLE:''{{PAGENAME}}''}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "DISPLAYTITLE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "''",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "PAGENAME",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "''",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Parsoid: Template-generated DISPLAYTITLE",
		"wikitext": "{{{{1x|DISPLAYTITLE}}:Foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "DISPLAYTITLE",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": ":Foo",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Namespace 1 {{ns:1}}",
		"wikitext": "{{ns:1}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "ns",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Namespace 1 {{ns:01}}",
		"wikitext": "{{ns:01}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "ns",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "01",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Namespace 0 {{ns:0}} (T6783)",
		"wikitext": "{{ns:0}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "ns",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "0",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Namespace 0 {{ns:00}} (T6783)",
		"wikitext": "{{ns:00}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "ns",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "00",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Namespace -1 {{ns:-1}}",
		"wikitext": "{{ns:-1}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "ns",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Namespace User {{ns:User}}",
		"wikitext": "{{ns:User}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "ns",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "User",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Namespace User talk {{ns:User_talk}}",
		"wikitext": "{{ns:User_talk}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "ns",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "User_talk",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Namespace User talk {{ns:uSeR tAlK}}",
		"wikitext": "{{ns:uSeR tAlK}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "ns",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "uSeR tAlK",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Namespace File {{ns:File}}",
		"wikitext": "{{ns:File}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "ns",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "File",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Namespace File {{ns:Image}}",
		"wikitext": "{{ns:Image}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "ns",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Image",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Urlencode",
		"wikitext": "{{urlencode:hi world?!}}\n{{urlencode:hi world?!|WIKI}}\n{{urlencode:hi world?!|PATH}}\n{{urlencode:hi world?!|QUERY}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "urlencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "hi world?!",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "urlencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "hi world?!",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "WIKI",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "urlencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "hi world?!",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "PATH",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "urlencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "hi world?!",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "QUERY",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "__proto__ is treated as normal wikitext (T105997)",
		"wikitext": "__proto__",
		"nodes": [
			{
				"text": "__proto__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "Template titles with entities in them",
		"wikitext": "*{{Foo–bar}}\n*{{Foo&ndash;bar}}",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Foo–bar",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Foo",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "&ndash;",
				"name": "mw-template-ground mw-html-entity"
			},
			{
				"text": "bar",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Nonexistent template",
		"wikitext": "{{thistemplatedoesnotexist}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "thistemplatedoesnotexist",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template with invalid target containing tags",
		"wikitext": "{{a<b>b</b>|{{1x|foo}}|{{1x|a}}={{1x|b}}|a = b}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "a",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "b",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "b",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "b",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "a",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "=",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "b",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a =",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": " b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template with invalid target containing unclosed tag",
		"wikitext": "{{a<b>|{{1x|foo}}|{{1x|a}}={{1x|b}}|a = b}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "a",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "b",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "a",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "=",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "b",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a =",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": " b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template with invalid target containing wikilink",
		"wikitext": "{{[[Main Page]]}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "[[Main Page]]",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template with just whitespace in it, T70421",
		"wikitext": "{{1x|{{ }}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{ }}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template with just whitespace (bad template brace matching)",
		"wikitext": "{{1x|{{ }<nowiki>}</nowiki>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{ ",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "}",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "<",
				"name": "mw-template2-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template2-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template2-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}",
				"name": "mw-template2-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-template2-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template2-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template2-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			}
		]
	},
	{
		"desc": "Simple template",
		"wikitext": "{{test}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "test",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template with explicit namespace",
		"wikitext": "{{Template:test}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Template:test",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template parameter",
		"wikitext": "{{paramtest|param=foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "paramtest",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "param=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template unnamed parameter",
		"wikitext": "{{paramtestnum|Main Page|the main page}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "paramtestnum",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Main Page",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "the main page",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template with template name as unnamed argument",
		"wikitext": "{{templateasargtestnum|templatesimple}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "templateasargtestnum",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "templatesimple",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template with template name as argument",
		"wikitext": "{{templateasargtest|templ=simple}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "templateasargtest",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "templ=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "simple",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template with template name as argument (2)",
		"wikitext": "{{templateasargtest2|templ=templatesimple}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "templateasargtest2",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "templ=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "templatesimple",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template with default value",
		"wikitext": "{{templateasargtestdefault}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "templateasargtestdefault",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template with default value (value set)",
		"wikitext": "{{templateasargtestdefault|templ=templa}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "templateasargtestdefault",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "templ=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "templa",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template redirect",
		"wikitext": "{{templateredirect}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "templateredirect",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template with argument in separate line",
		"wikitext": "{{ templateasargtest  |\n templ = simple }}",
		"nodes": [
			{
				"text": "{{ ",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "templateasargtest",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "  |",
				"name": "mw-template-ground separator"
			},
			{
				"text": " templ =",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": " simple ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template with complex template as argument",
		"wikitext": "{{paramtest|\n  param ={{ templateasargtest  |\n templ = simple }}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "paramtest",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "  param =",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "{{ ",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "templateasargtest",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "  |",
				"name": "mw-template2-ground separator"
			},
			{
				"text": " templ =",
				"name": "mw-template2-ground definitionKeyword"
			},
			{
				"text": " simple ",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates with templated name",
		"wikitext": "{{{{1x|1x}}|foo}}\n{{{{1x|inner list}} }}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "inner list",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": " }}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates with templated name and top level template args",
		"wikitext": "{{1{{2{{{3}}}|4=5}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "2",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "{{{",
				"name": "mw-template2-ground brace"
			},
			{
				"text": "3",
				"name": "mw-template2-ground variableName"
			},
			{
				"text": "}}}",
				"name": "mw-template2-ground brace"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "4=",
				"name": "mw-template2-ground definitionKeyword"
			},
			{
				"text": "5",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T372669: While processing templates with templated names, other attributes shouldn't be processed",
		"wikitext": "{{{{1x|1x}}|foo|{{1x|ignore-this[[Category:Foo]]}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "ignore-this",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "[[",
				"name": "mw-template2-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-template2-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template2-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T372669: Template names from multiple templates",
		"wikitext": "{{{{1x|1}}{{1x|x}}|foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "1",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "x",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates with invalid templated targets",
		"wikitext": "{{1x\n{{1x|foo}}\n}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template with complex arguments",
		"wikitext": "{{complextemplate|\n  param ={{ templateasargtest  |\n templ = simple }}|[[Template:complextemplate|link]]}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "complextemplate",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "  param =",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "{{ ",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "templateasargtest",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "  |",
				"name": "mw-template2-ground separator"
			},
			{
				"text": " templ =",
				"name": "mw-template2-ground definitionKeyword"
			},
			{
				"text": " simple ",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Template:complextemplate",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground operator"
			},
			{
				"text": "link",
				"name": "mw-template-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T2553: link with two variables in a piped link",
		"wikitext": "{|\n|[[{{{1}}}|{{{2}}}]]\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{{",
				"name": "mw-link-ground brace"
			},
			{
				"text": "1",
				"name": "mw-link-ground variableName"
			},
			{
				"text": "}}}",
				"name": "mw-link-ground brace"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{{{",
				"name": "mw-link-ground brace"
			},
			{
				"text": "2",
				"name": "mw-link-ground variableName"
			},
			{
				"text": "}}}",
				"name": "mw-link-ground brace"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Bail on table cell attribute parsing on wikilink",
		"wikitext": "{|\n|testing [[one|two]] |three||four\n|testing one two |three||four\n|testing=\"[[one|two]]\" |three||four\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "one",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "two",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "one",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "two",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Don't bail on table cell attribute parsing if wikilink is found in template arg",
		"wikitext": "{|\n|Test {{#tag:spantag|One two \"[[three]]\" four}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "spantag",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "One two \"",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "[[",
				"name": "mw-ext-link-ground squareBracket"
			},
			{
				"text": "three",
				"name": "mw-ext-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-ext-link-ground squareBracket"
			},
			{
				"text": "\" four",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Magic variable as template parameter",
		"wikitext": "{{paramtest|param={{SITENAME}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "paramtest",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "param=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "SITENAME",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template parameter as link source",
		"wikitext": "{{linktest|param=Main Page}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "linktest",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "param=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "Main Page",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template passing argument to another template",
		"wikitext": "{{paramtest2|arg='hmm'}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "paramtest2",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "arg=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "'hmm'",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template as link source",
		"wikitext": "[[{{linktest2}}]]\n\n[[{{linktest2}}|Main Page]]\n\n[[{{linktest2}}]]Page",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "linktest2",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "linktest2",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "linktest2",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Template infinite loop",
		"wikitext": "{{loop1}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "loop1",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template from main namespace",
		"wikitext": "{{:Main Page}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": ":Main Page",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template from non-includable namespace",
		"wikitext": "{{1x|uh oh!}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "uh oh!",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T2529: Template with table, not included at beginning of line",
		"wikitext": "foo {{table}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T2523: Template shouldn't eat newline (or add an extra one before table)",
		"wikitext": "foo\n{{table}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T2041: Template parameters shown as broken links",
		"wikitext": "{{{parameter}}}",
		"nodes": [
			{
				"text": "{{{",
				"name": "brace"
			},
			{
				"text": "parameter",
				"name": "variableName"
			},
			{
				"text": "}}}",
				"name": "brace"
			}
		]
	},
	{
		"desc": "Unsubstituted template argument with newlines",
		"wikitext": "{{{testing\n\n123}}}",
		"nodes": [
			{
				"text": "{{{",
				"name": "brace"
			},
			{
				"text": "testing",
				"name": "variableName"
			},
			{
				"text": "123",
				"name": "variableName"
			},
			{
				"text": "}}}",
				"name": "brace"
			}
		]
	},
	{
		"desc": "Template with targets containing wikilinks",
		"wikitext": "{{[[foo]]}}\n\n{{[[{{1x|foo}}]]}}\n\n{{{{1x|[[foo}}]]}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "[[foo]]",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "[[",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template2-link-ground squareBracket"
			},
			{
				"text": "foo}}",
				"name": "mw-template2-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template2-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Double quotes as template target",
		"wikitext": "foo {{''}} baz",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "''",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates with intersecting and overlapping ranges",
		"wikitext": "{|{{1x|1=class=\"foo\"\n<p>ha</p>}}\n{|{{1x|1=class=\"bar\"\n<p>ho</p>}}\n{{1x|{{!}}hi}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "class=\"foo\"",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "p",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "ha",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "p",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "class=\"bar\"",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "p",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "ho",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "p",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "hi",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "msgnw keyword",
		"wikitext": "{{msgnw:MSGNW test}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "msgnw",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "MSGNW test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "int keyword",
		"wikitext": "{{int:new-messages|lots of money|not!}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "int",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "new-messages",
				"name": "mw-ext-ground unit mw-pagename mw-function-8"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "lots of money",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "not!",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "int keyword - non-existing message",
		"wikitext": "{{int:var}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "int",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "var",
				"name": "mw-ext-ground unit mw-pagename mw-function-8"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "<includeonly> and <noinclude> being included",
		"wikitext": "{{Includes}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Includes",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "<onlyinclude> being included",
		"wikitext": "{{Includes2}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Includes2",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "<onlyinclude> and <includeonly> being included",
		"wikitext": "{{Includes3}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Includes3",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "<includeonly> and <noinclude> on a page",
		"wikitext": "Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Un-closed <noinclude>",
		"wikitext": "<noinclude>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Empty <noinclude>",
		"wikitext": "Hello<noinclude></noinclude>!",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Nested <noinclude>s",
		"wikitext": "<noinclude>\nx\n<noinclude>y</noinclude>\nz\n</noinclude>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "<onlyinclude> on a page",
		"wikitext": "<onlyinclude>Foo</onlyinclude>bar",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Un-closed <onlyinclude>",
		"wikitext": "<onlyinclude>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T236868: Un-closed <noinclude> caused bad SourceRange length",
		"wikitext": "{| <noinclude>\n|- <noinclude>\n|A\n|- </noinclude>\n|}",
		"nodes": [
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|- ",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|- ",
				"name": "typeOperator"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Self-closed noinclude, includeonly, onlyinclude tags",
		"wikitext": "<noinclude />\n<includeonly />\n<onlyinclude />",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude ",
				"name": "tagName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly ",
				"name": "tagName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "onlyinclude ",
				"name": "tagName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Unbalanced includeonly and noinclude tags",
		"wikitext": "{|\n|a</noinclude>\n|b</noinclude></noinclude>\n|c</noinclude></includeonly>\n|d</includeonly></includeonly>\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "</noinclude>",
				"name": "mw-error"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "</noinclude></noinclude>",
				"name": "mw-error"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "</noinclude></includeonly>",
				"name": "mw-error"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "</includeonly></includeonly>",
				"name": "mw-error"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "includeonly / noinclude / onlyinclude and headers",
		"wikitext": "<includeonly><!--hello1 --></includeonly>== test 1 == <includeonly><!--hello2 --></includeonly>\n<noinclude><!--hello3 --></noinclude>== test 2 == <noinclude><!--hello4 --></noinclude>\n<onlyinclude><!--hello5 --></onlyinclude>== test 3 == <onlyinclude><!--hello6 --></onlyinclude>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<!--hello1 -->",
				"name": "comment"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<!--hello2 -->",
				"name": "comment"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<!--hello3 -->",
				"name": "comment"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<!--hello4 -->",
				"name": "comment"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<!--hello5 -->",
				"name": "comment"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<!--hello6 -->",
				"name": "comment"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T8563: Section extraction for section shown by <includeonly>",
		"wikitext": "<includeonly>\n==Includeonly section==\n</includeonly>\n==Section T-2==",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Includeonly section",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Section T-2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "T8563: Section extraction for section suppressed by <includeonly>",
		"wikitext": "<includeonly>\n==Includeonly section==\n</includeonly>\n==Section 1==",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Includeonly section",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Section 1",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Un-closed <includeonly>",
		"wikitext": "<includeonly>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Includes and comments at SOL",
		"wikitext": "<!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==\n\n<noinclude>\nsome\n</noinclude>*stuff\n*here\n\n<noinclude>\nsome</noinclude>* stuff\n* here\n\n<includeonly>can have stuff</includeonly>===here===\n\n__INDEX__== hi ==",
		"nodes": [
			{
				"text": "<!-- comment -->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<!-- comment -->",
				"name": "comment"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<!-- comment -->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "__INDEX__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "Parsoid: DOM fragment reuse",
		"wikitext": "a{{1x|b<table></table>c}}d\n\na{{1x|b\n<table></table>\nc}}d\n\n{{1x|a\n\n<table></table>\n\nb}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "c",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "c",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template name with question mark",
		"wikitext": "{{temp?|123}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "temp?",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "123",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "0. includeonly around the entire attribute",
		"wikitext": "<span <includeonly>id=\"v1\"</includeonly><noinclude>id=\"v2\" </noinclude>>bar</span>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</span>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "1. includeonly in html attr key",
		"wikitext": "<span <noinclude>id</noinclude><includeonly>about</includeonly>=\"foo\">bar</span>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</span>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "2. includeonly in html attr value",
		"wikitext": "<span id=\"<noinclude>v1</noinclude><includeonly>v2</includeonly>\">bar</span>\n<span id=<noinclude>\"v1\"</noinclude><includeonly>\"v2\"</includeonly>>bar</span>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</span>",
				"name": "mw-error"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</span>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "3. includeonly in part of an attr value",
		"wikitext": "<span style=\"color:<noinclude>red</noinclude><includeonly>blue</includeonly>;\">bar</span>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"color:",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</span>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "4. includeonly in table attributes",
		"wikitext": "{|\n|- <noinclude>\n|-\n|a\n</noinclude>\n|- <includeonly>\n|-\n|b\n</includeonly>\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|- ",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|- ",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "1. Table tag in SOL posn. should get reparsed correctly with valid TSR",
		"wikitext": "{{1x|}}{| width = '100%'\n|foo\n|}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "2. Table tag in SOL posn. should get reparsed correctly with valid TSR",
		"wikitext": "<includeonly>a</includeonly>{| {{{b}}}\n|c\n|}",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{{",
				"name": "brace"
			},
			{
				"text": "b",
				"name": "variableName"
			},
			{
				"text": "}}}",
				"name": "brace"
			}
		]
	},
	{
		"desc": "Table wikitext syntax outside wiki-tables",
		"wikitext": "a\n|+ not a caption\n! not a table heading!! neither is this\n|- not a table row\n| not a table cell || neither is this\n| class=\"foo bar\" | baz\nb\n|}\n|-\nc",
		"nodes": []
	},
	{
		"desc": "1. Templated table wikitext syntax outside wiki-tables",
		"wikitext": "|-\n{{1x|!a!!b}}\n|-\n{{1x|{{!}}a {{!}}{{!}}b}}\n|-\n{{1x|1={{!}} class='boo' {{!}} bar}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "!a!!b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "a ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": " class='boo' ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": " bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "2. Templated table wikitext syntax outside wiki-tables",
		"wikitext": "{{1x|1={{!}}- class='trclass'}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "- class='trclass'",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Content after <tr> like wikitext should get fully processed",
		"wikitext": "x\n|- [[Foo]] and {{1x|bar}}\ny",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "P-wrapping should not break after <td>s separated by newlines are converted back to pipes",
		"wikitext": "a\n|b\n\n|c\nd",
		"nodes": []
	},
	{
		"desc": "Orphaned table row wikitext with templated table for an attribute should not duplicate table",
		"wikitext": "|-{{1x|\n{{{!}}\n{{!}}foo\n{{!}}}\n}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "}",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "1. Support token gluing for <tr> tags",
		"wikitext": "{|\n{{1x|1=\n{{!}}- title='test' <div>x</div> boo}} class=\"foo\"\n|bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "- title='test' ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "x",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": " boo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "3. Unsupported token gluing scenario across an unclosed template",
		"wikitext": "{|\n{{1x|1=\n{{!}}- title='test' <div>x</div> boo}} {{1x|1=class='foo'\n{{!}}a\n{{!}}-\n}}\n|bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "- title='test' ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "x",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": " boo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "class='foo'",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "-",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "4. Non-token gluing scenario across an unclosed template should be handled properly",
		"wikitext": "{|\n{{1x|1=\n{{!}}- title='test'\n{{!}}a\n{{!}}-\n}}\n|bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "- title='test'",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "-",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "5. Non-token gluing scenario across an unclosed template should be handled properly",
		"wikitext": "{|\n{{1x|1=\n{{!}}- title='test' <div>x</div> boo}} {{1x|\n{{!}}a\n{{!}}-\n}}\n|bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "- title='test' ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "x",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": " boo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "-",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "5. Non-token gluing scenario across multiple lines and templates",
		"wikitext": "{|\n{{1x|1=\n{{!}}-\n}}{{1x|{{!}}} }}\n[[Category:Foo]]",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "-",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "} ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "6. Non-token gluing scenario where a templated tr is found in templated tr attribute position",
		"wikitext": "{|\n{{just tr}}{{just tr}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "just tr",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "just tr",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "7. Unsupported token gluing scenario when includeonly tags show up",
		"wikitext": "{|\n{{1x|{{!}}-}}<includeonly>\n|+foo</includeonly>\n|bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "-",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|+",
				"name": "typeOperator"
			},
			{
				"text": "foo",
				"name": "mw-table-caption"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Templates: Template Name/Arg clash: 1. Use of positional param",
		"wikitext": "{{quote|foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "quote",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Template Name/Arg clash: 2. Use of named param",
		"wikitext": "{{quote|quote=foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "quote",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "quote=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: 1. Simple use",
		"wikitext": "{{1x|Foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: 2. Inside a block tag",
		"wikitext": "<div>{{1x|Foo}}</div>\n<blockquote>{{1x|Foo}}</blockquote>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: P-wrapping: 1a. Templates on consecutive lines",
		"wikitext": "{{1x|Foo}}\n{{1x|bar}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: P-wrapping: 1b. Templates on consecutive lines",
		"wikitext": "Foo\n\n{{1x|bar}}\n{{1x|baz}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "baz",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: P-wrapping: 1c. Templates on consecutive lines",
		"wikitext": "{{1x|Foo}}\n{{1x|bar}} <div>baz</div>",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: P-wrapping: 1d. Template preceded by comment-only line",
		"wikitext": "<!-- foo -->\n{{1x|Bar}}",
		"nodes": [
			{
				"text": "<!-- foo -->",
				"name": "comment"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Scopes should not be expanded unnecessarily",
		"wikitext": "{{1x|<div>a</div>}}b{{1x|\n<div>c</div>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "c",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Inline Text: 1. Multiple template uses",
		"wikitext": "{{1x|Foo}}bar{{1x|baz}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "baz",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Inline Text: 2. Back-to-back template uses",
		"wikitext": "{{1x|Foo}}{{1x|bar}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Block Tags: 1. Multiple template uses",
		"wikitext": "{{1x|<div>Foo</div>}}<div>bar</div>{{1x|<div>baz</div>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "Foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "baz",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Block Tags: 2. Back-to-back template uses",
		"wikitext": "{{1x|<div>Foo</div>}}{{1x|<div>bar</div>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "Foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag",
		"wikitext": "{{1x|a\nb</p>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</p>",
				"name": "mw-error"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Drop stripped tag markers, unless they have encapsulation info",
		"wikitext": "{{1x|<tr></tr>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Links: 1. Simple example",
		"wikitext": "{{1x|[[Foo|bar]]}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-template-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Links: 2. Generation of link href",
		"wikitext": "[[{{1x|Foo}}|bar]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "Foo",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Templates: Links: 3. Generation of part of a link href",
		"wikitext": "[[Fo{{1x|o}}|bar]]\n\n[[Foo{{1x|bar}}]]\n\n[[Foo{{1x|bar}}baz]]\n\n[[Foo{{1x|bar}}|bar]]\n\n[[:Foo{{1x|bar}}]]\n\n[[:Foo{{1x|bar}}|bar]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Fo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "o",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "bar",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "bar",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "bar",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "bar",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "bar",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Templates: Links: 4. Multiple templates generating link href",
		"wikitext": "[[{{1x|F}}{{1x|o}}ob{{1x|ar}}]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "F",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "o",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "ob",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "ar",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Templates: Links: 5. Generation of link text",
		"wikitext": "[[Foo|{{1x|bar}}]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "bar",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Templates: Links: 5. Nested templates (only outermost template should be marked)",
		"wikitext": "{{1x|[[{{1x|Foo}}|bar]]}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template2-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-link-ground separator"
			},
			{
				"text": "Foo",
				"name": "mw-template2-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-link-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-template-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "File with template filename",
		"wikitext": "[[File:{{1x|Foobar.jpg}}]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "Foobar.jpg",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tag: 1. Generation of HTML attr. key",
		"wikitext": "<div {{1x|style}}=\"color:red;\">foo</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "style",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "=",
				"name": "attributeName"
			},
			{
				"text": "\"color:red;\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tag: 2. Generation of HTML attr. value",
		"wikitext": "<div style={{1x|'color:red;'}}>foo</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "'color:red;'",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tag: 3. Generation of HTML attr key and value",
		"wikitext": "<div {{1x|style}}={{1x|'color:red;'}}>foo</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "style",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "=",
				"name": "attributeName"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "'color:red;'",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tag: 4. Generation of starting piece of HTML attr value",
		"wikitext": "<div title=\"{{1x|This is a long title}} with just one piece templated\">foo</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "This is a long title",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": " with just one piece templated\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tag: 5. Generation of middle piece of HTML attr value",
		"wikitext": "<div title=\"This is a long title with just {{1x|one piece}} templated\">foo</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"This is a long title with just ",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "one piece",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": " templated\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tag: 6. Generation of end piece of HTML attr value",
		"wikitext": "<div title=\"This is a long title with just one piece {{1x|templated}}\">foo</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"This is a long title with just one piece ",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "templated",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tag: 7. Generation of partial attribute key string",
		"wikitext": "<div st{{1x|yle}}=\"color:red;\">foo</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "st",
				"name": "attributeName"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "yle",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "=",
				"name": "attributeName"
			},
			{
				"text": "\"color:red;\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tag: 8. Template-generated attribute (k=v)",
		"wikitext": "<div {{1x|1=id=\"v1\"}}>bar</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "id=\"v1\"",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tag: 9. Multiple template-generated attributes",
		"wikitext": "<div {{1x|1=id=\"v1\" title=\"foo\"}}>bar</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "id=\"v1\" title=\"foo\"",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: Support for templates generating attributes and content",
		"wikitext": "{| {{mixed_attr_content_template}}\n|-\n|bar\n|}",
		"nodes": [
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "mixed_attr_content_template",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Templates: Support for templates generating table attributes and content (with fostered categories)",
		"wikitext": "{| {{mixed_attr_content_template_2}}\n|-\n|bar\n|}",
		"nodes": [
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "mixed_attr_content_template_2",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Table cell with attribute before expanded attribute",
		"wikitext": "{|\n| align=\"center\" {{attribute_from_template}} |456\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "attribute_from_template",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "1. Entities and nowikis inside templated attributes should be handled correctly",
		"wikitext": "<div {{1x|style{{=}}\"background:&#35;f9f9f9;\"}}>foo</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "style",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "=",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "\"background:",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "&#35;",
				"name": "mw-template-ground mw-html-entity"
			},
			{
				"text": "f9f9f9;\"",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "2. Entities and nowikis inside templated attributes should be handled correctly",
		"wikitext": "{|\n|{{table_attribs_3}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_attribs_3",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables",
		"wikitext": "{{tbl-start}}\n|{{table_attribs_3}}\n{{tbl-end}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "tbl-start",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_attribs_3",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "tbl-end",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables",
		"wikitext": "{|\n|{{table_attribs_6}} hi\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_attribs_6",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Extension tag in templated tag attribute",
		"wikitext": "{{1x|1=\n{{{!}} class=\"123\" <nowiki />\n{{!}} hi\n{{!}}}\n}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "{",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": " class=\"123\" ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki ",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": " hi",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "}",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tables: 1. Generating start of a HTML table",
		"wikitext": "{{1x|<table><tr><td>foo</td>}}</tr></table>",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tables: 2a. Generating middle of a HTML table",
		"wikitext": "<table><tr>{{1x|<td>foo</td>}}</tr></table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tables: 2b. Generating middle of a HTML table",
		"wikitext": "<table>{{1x|<tr><td>foo</td></tr>}}</table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tables: 3. Generating end of a HTML table",
		"wikitext": "<table><tr>{{1x|<td>foo</td></tr></table>}}",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tables: 4a. Generating a single tag of a HTML table",
		"wikitext": "{{1x|<table>}}<tr><td>foo</td></tr></table>",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tables: 4b. Generating a single tag of a HTML table",
		"wikitext": "<table>{{1x|<tr>}}<td>foo</td></tr></table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tables: 4c. Generating a single tag of a HTML table",
		"wikitext": "<table><tr>{{1x|<td>}}foo</td></tr></table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tables: 4d. Generating a single tag of a HTML table",
		"wikitext": "<table><tr><td>foo{{1x|</td>}}</tr></table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tables: 4e. Generating a single tag of a HTML table",
		"wikitext": "<table><tr><td>foo</td>{{1x|</tr>}}</table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tables: 4f. Generating a single tag of a HTML table",
		"wikitext": "<table><tr><td>foo</td></tr>{{1x|</table>}}",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: HTML Tables: 5. Proper fostering of categories from inside",
		"wikitext": "<table>[[Category:foo1]]<tr><td>foo</td></tr></table>\n<!--Two categories (T52330)-->\n<table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:foo1",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<!--Two categories (T52330)-->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:bar1",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]][[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:bar2",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: Wiki Tables: 1a. Fostering of entire template content",
		"wikitext": "{|\n{{1x|a}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Templates: Wiki Tables: 1b. Fostering of entire template content",
		"wikitext": "{|\n{{1x|<div>}}\nfoo\n{{1x|</div>}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Templates: Wiki Tables: 2. Fostering of partial template content",
		"wikitext": "{|\n{{1x|a\n<div>b</div>}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Templates: Wiki Tables: 3. td-content via multiple templates",
		"wikitext": "{|\n{{1x|{{pipe}}a}}{{1x|b}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "pipe",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Templates: Wiki Tables: 4. Templated tags, no content",
		"wikitext": "{{tbl-start}}\n{{tbl-end}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "tbl-start",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "tbl-end",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Wiki Tables: 5. Templated tags, regular td-tags",
		"wikitext": "{{tbl-start}}\n|foo\n{{tbl-end}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "tbl-start",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "tbl-end",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Wiki Tables: 6. Templated tags, templated td-tags",
		"wikitext": "{{tbl-start}}\n{{!}}foo\n{{tbl-end}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "tbl-start",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "tbl-end",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered",
		"wikitext": "{{UnclosedTableEndsWithTR}}\n<onlyinclude>\n|foo\n</onlyinclude>\n|}\n\n<noinclude>\n{{UnclosedTableEndsWithTR}}\n</noinclude>\n|foo\n|}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "UnclosedTableEndsWithTR",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "UnclosedTableEndsWithTR",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: Lists: Multi-line list-items via templates",
		"wikitext": "*{{1x|a {{nonexistent|\nunused}}}}\n*{{1x|b {{nonexistent|\nunused}}}}",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "nonexistent",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "unused",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "b ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "nonexistent",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "unused",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Ugly nesting: 1. Quotes opened/closed across templates (1x)",
		"wikitext": "{{1x|''a}}{{1x|b''c''d}}{{1x|''e}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "''a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "b''c''d",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "''e",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Ugly nesting: 2. Quotes opened/closed across templates (1x_with_span)",
		"wikitext": "{{1x_with_span|''a}}{{1x_with_span|b''c''d}}{{1x_with_span|''e}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x_with_span",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "''a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x_with_span",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "b''c''d",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x_with_span",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "''e",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Ugly nesting: 3. Quotes opened/closed across templates (1x_with_div)",
		"wikitext": "{{1x_with_div|''a}}{{1x_with_div|b''c''d}}{{1x_with_div|''e}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x_with_div",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "''a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x_with_div",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "b''c''d",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x_with_div",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "''e",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Ugly nesting: 4. Divs opened/closed across templates",
		"wikitext": "a<div>b{{1x|c</div>d}}e",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "c",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "d",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Ugly templates: 3. newline-only template parameter",
		"wikitext": "foo {{1x|\n}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Ugly templates: 4. newline-only template parameter inconsistency",
		"wikitext": "{{1x|\n}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled",
		"wikitext": "{{1x|<table>}}\n{{1x|<div>foo}}\n{{1x|</table>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "</table>",
				"name": "mw-error"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled",
		"wikitext": "{{1x|<table><tr><td><table>}}\n{{1x|<div>}}\n{{1x|</div>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Parameters substituted at the top-level",
		"wikitext": "{{{foo|''who'' {{1x|me}}? '''never!'''}}}\n\n{{{foo|bar|baz}}}",
		"nodes": [
			{
				"text": "{{{",
				"name": "brace"
			},
			{
				"text": "foo",
				"name": "variableName"
			},
			{
				"text": "|",
				"name": "mw-templatevariable-delimiter"
			},
			{
				"text": "''who'' ",
				"name": "atom"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "me",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "? '''never!'''",
				"name": "atom"
			},
			{
				"text": "}}}",
				"name": "brace"
			},
			{
				"text": "{{{",
				"name": "brace"
			},
			{
				"text": "foo",
				"name": "variableName"
			},
			{
				"text": "|",
				"name": "mw-templatevariable-delimiter"
			},
			{
				"text": "bar|baz",
				"name": "atom"
			},
			{
				"text": "}}}",
				"name": "brace"
			}
		]
	},
	{
		"desc": "Templates: Param with empty arg in the final position",
		"wikitext": "{{{hi|}}}",
		"nodes": [
			{
				"text": "{{{",
				"name": "brace"
			},
			{
				"text": "hi",
				"name": "variableName"
			},
			{
				"text": "|",
				"name": "mw-templatevariable-delimiter"
			},
			{
				"text": "}}}",
				"name": "brace"
			}
		]
	},
	{
		"desc": "Compound transclusion with template and top level templatearg",
		"wikitext": "{{1x|<table>}}\n{{{top|<td>123</td>}}}\n</table>",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{{",
				"name": "brace"
			},
			{
				"text": "top",
				"name": "variableName"
			},
			{
				"text": "|",
				"name": "mw-templatevariable-delimiter"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "123",
				"name": "atom"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "}}}",
				"name": "brace"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Parser Functions: 1. Simple example",
		"wikitext": "{{uc:foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "uc",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "foo",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Parser Functions: 2. Nested use (only outermost should be marked up)",
		"wikitext": "{{uc:{{lc:FOO}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "uc",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "lc",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": "FOO",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Parsoid: Recognize nowiki with odd capitalization",
		"wikitext": "<noWikI ><div>[[foo]]</Nowiki >",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "noWikI ",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<div>[[foo]]",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "Nowiki ",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Parsoid: Escape nowiki with trailing space in tags",
		"wikitext": "&lt;nowiki &gt; foo &lt;/nowiki &gt;\n\na&lt;nowiki /&gt;b\n\nc&lt;nowiki/ &gt;d",
		"nodes": [
			{
				"text": "&lt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&gt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&lt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&gt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&lt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&gt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&lt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&gt;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "Parsoid: Escape weird noWikI capitalizations",
		"wikitext": "&lt;noWikI &gt; foo &lt;/NoWikI &gt;",
		"nodes": [
			{
				"text": "&lt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&gt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&lt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&gt;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "message transform: magic variables",
		"wikitext": "{{SITENAME}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SITENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "message transform: should not transform wiki markup",
		"wikitext": "''test''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "test",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "message transform: <noinclude> in transcluded template (T6926)",
		"wikitext": "{{Includes}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Includes",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "message transform: <onlyinclude> in transcluded template (T6926)",
		"wikitext": "{{Includes2}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Includes2",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "{{#special:}} page name, known",
		"wikitext": "{{#special:Recentchanges}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#special",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Recentchanges",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "{{#special:}} page name with subpage, known",
		"wikitext": "{{#special:Recentchanges/param}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#special",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Recentchanges/param",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "{{#special:}} page name, unknown",
		"wikitext": "{{#special:foobar nonexistent}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#special",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "foobar nonexistent",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "{{#speciale:}} page name, known",
		"wikitext": "{{#speciale:Recentchanges}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#speciale",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Recentchanges",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "{{#speciale:}} page name with subpage, known",
		"wikitext": "{{#speciale:Recentchanges/param}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#speciale",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Recentchanges/param",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "{{#speciale:}} page name, unknown",
		"wikitext": "{{#speciale:foobar nonexistent}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#speciale",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "foobar nonexistent",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Subpage link",
		"wikitext": "[[/subpage]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "/subpage",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Subpage noslash link",
		"wikitext": "[[/subpage/]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "/subpage/",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Relative subpage noslash link",
		"wikitext": "[[../../subpage/]]\n\n[[../../subpage]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "../../subpage/",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "../../subpage",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid: dot-slash prefixed wikilinks",
		"wikitext": "[[./foo]]\n\n[[././bar]]\n\n[[././baz/]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "./foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "././bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "././baz/",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Render invalid page names as plain text (T53090)",
		"wikitext": "[[./../foo|bar]]\n[[foo�|bar]]\n[[foo/.|bar]]\n[[foo/..|bar]]\n[[foo~~~bar]]\n[[foo>bar]]\n[[foo[bar]]\n[[.]]\n[[..]]\n[[foo././bar]]\n[[foo[http://example.com]xyz]]\n\n[[{{1x|./../foo}}|bar]]\n[[{{1x|foo/.}}|bar]]\n[[{{1x|foo/..}}|bar]]\n[[{{1x|foo~~~~bar}}]]\n[[{{1x|foo>bar}}]]\n[[{{1x|foo././bar}}]]\n[[{{1x|foo{bar}}]]\n[[{{1x|foo}bar}}]]\n[[{{1x|foo[bar}}]]\n[[{{1x|foo]bar}}]]\n[[{{1x|foo<bar}}]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "./../foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "foo�",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "foo/.",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "foo/..",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "~~~",
				"name": "quote"
			},
			{
				"text": "bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "foo>bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "foo[bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ".",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "..",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "foo././bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "foo[http://example.com]xyz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "./../foo",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "foo/.",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "foo/..",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "~~~~",
				"name": "quote"
			},
			{
				"text": "bar",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "foo>bar",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "foo././bar",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "foo{bar",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "foo}bar",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "foo[bar",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "foo]bar",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "foo<bar",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Disabled subpages",
		"wikitext": "[[/subpage]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "/subpage",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T2561: {{/Subpage}}",
		"wikitext": "{{/Subpage}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "/Subpage",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Subpage with namespaces",
		"wikitext": "[[User:../subpage]]\n[[meatball:../subpage]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "User:../subpage",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:../subpage",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T335847: Resolve forward slash title",
		"wikitext": "===123===",
		"nodes": [
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "123",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "T335847: Resolve subpage of control title",
		"wikitext": "[[../Hi]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "../Hi",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T335847: Resolve subpage of forward slash title",
		"wikitext": "[[../Hi]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "../Hi",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link to category",
		"wikitext": "[[:Category:MediaWiki User's Guide]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Category:MediaWiki User's Guide",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Simple category",
		"wikitext": "[[Category:MediaWiki User's Guide]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:MediaWiki User's Guide",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Simple category with whitespace as sort key",
		"wikitext": "[[Category:Foo| ]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "| ",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "PAGESINCATEGORY invalid title fatal (r33546 fix)",
		"wikitext": "{{PAGESINCATEGORY:<bogus>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PAGESINCATEGORY",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<bogus>",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Category with different sort key",
		"wikitext": "[[Category:MediaWiki User's Guide|Foo]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:MediaWiki User's Guide",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Category with identical sort key",
		"wikitext": "[[Category:MediaWiki User's Guide|MediaWiki User's Guide]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:MediaWiki User's Guide",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "MediaWiki User's Guide",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Category with identical sort key, except underscores",
		"wikitext": "[[Category:MediaWiki User's Guide|MediaWiki_User's_Guide]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:MediaWiki User's Guide",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "MediaWiki_User's_Guide",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Category with newline in sort key",
		"wikitext": "[[Category:Wikidata:Tools|\n*]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Wikidata:Tools",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "*",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Category with template-generated sort key",
		"wikitext": "[[Category:MediaWiki User's Guide|MediaWiki {{1x|Foo}} Guide]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:MediaWiki User's Guide",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "MediaWiki ",
				"name": "mw-link-ground string"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "Foo",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": " Guide",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Category / paragraph interactions",
		"wikitext": "Foo [[Category:Baz]] Bar\n\nFoo [[Category:Baz]]\nBar\n\nFoo\n[[Category:Baz]]\nBar\n\nFoo\n[[Category:Baz]] Bar\n\nFoo\n[[Category:Baz]]\n [[Category:Baz]]\n[[Category:Baz]]\nBar\n\n[[Category:Baz]]\n [[Category:Baz]]\n[[Category:Baz]]\n\n[[Category:Baz]]\n {{1x|[[Category:Baz]]}}\n[[Category:Baz]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Category:Baz",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Category / non-newline whitespace interactions (T359886)",
		"wikitext": "* Foo[[Category:Foo]]Bar\n* Foo[[Category:Foo]] Bar\n* Foo [[Category:Foo]]Bar\n* Foo [[Category:Foo]] Bar\n\n* Foo[[Category:Foo]][[Category:Bar]]Bar\n* Foo[[Category:Foo]][[Category:Bar]] Bar\n* Foo[[Category:Foo]] [[Category:Bar]]Bar\n* Foo[[Category:Foo]] [[Category:Bar]] Bar\n* Foo [[Category:Foo]][[Category:Bar]]Bar\n* Foo [[Category:Foo]][[Category:Bar]] Bar\n* Foo [[Category:Foo]] [[Category:Bar]]Bar\n* Foo [[Category:Foo]] [[Category:Bar]] Bar",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]][[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]][[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]][[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]][[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Language link / non-newline whitespace interactions (T359886)",
		"wikitext": "* Foo[[es:Foo]]Bar\n* Foo[[es:Foo]] Bar\n* Foo [[es:Foo]]Bar\n* Foo [[es:Foo]] Bar\n\n* Foo[[es:Foo]][[es:Bar]]Bar\n* Foo[[es:Foo]][[es:Bar]] Bar\n* Foo[[es:Foo]] [[es:Bar]]Bar\n* Foo[[es:Foo]] [[es:Bar]] Bar\n* Foo [[es:Foo]][[es:Bar]]Bar\n* Foo [[es:Foo]][[es:Bar]] Bar\n* Foo [[es:Foo]] [[es:Bar]]Bar\n* Foo [[es:Foo]] [[es:Bar]] Bar",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]][[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]][[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]][[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]][[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "1. cats/langlinks and newlines: All preceding newlines should be suppressed (courtesy T2087)",
		"wikitext": "This\n   \n[[Category:Foo]] and this\n[[es:Foo]] and this should be part of same paragraph (not an indent-pre)\n   \n{{1x|[[Category:Foo]] and so should this!}}\n{{1x|[[es:Foo]] and this!}}",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": " and so should this!",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": " and this!",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "2. cats/langlinks and newlines: All preceding newlines should be suppressed (courtesy T2087)",
		"wikitext": "* This\n   \n[[Category:Foo]] and this\n[[es:Foo]] and this should be part of the same list item\n* So should this\n\n{{1x|[[Category:Foo]] and this}}\n{{1x|[[es:Foo]] and this should be part of the same list item}}",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": " and this",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": " and this should be part of the same list item",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "3. cats/langlinks and newlines: newline suppression for last list item should RT properly",
		"wikitext": "*a\n*b\n   \n[[Category:Foo]]\n   \n[[Category:Bar]]\n[[Category:Baz]]\n[[es:Foo]]\n\n:c\n\n[[Category:C]]\n\n;d\n\n[[Category:D]]\n[[es:Bar]]",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:C",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "d",
				"name": "mw-strong"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:D",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "4. cats/langlinks: newline suppression for last list item should RT properly",
		"wikitext": "*a\n****b\n\n[[Category:Foo]]\n[[es:Foo]]",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "****",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "5. cats/langlinks: migrateTrailingSolTransparentLinks dom pass should only run on the rightmost path of nested lists",
		"wikitext": "*a\n**b\n[[Category:Foo]]\n*c\n**d\n[[Category:Foo]]\n[[es:Foo]]",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "**",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "**",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "6. cats/langlinks: migrateTrailingSolTransparentLinks dom pass should not migrate them when not preceded by newlines",
		"wikitext": "*a [[Category:Foo]]\n*b [[es:Foo]]",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "7. cats/langlinks: migrateTrailingSolTransparentLinks dom pass should leave template content alone",
		"wikitext": "*{{1x|a\n[[Category:Foo]]\n[[es:Foo]]}}",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "8. cats/langlinks: migrateTrailingSolTransparentLinks dom pass should not get tripped by intervening templates",
		"wikitext": "*a\n\n{{1x|[[Category:Foo]]\n[[Category:Bar]]}}\n[[Category:Baz]]\n[[es:Baz]]",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Category:Bar",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "cats/langlinks: migrateTrailingSolTransparentLinks dom pass should not get tripped by comments and whitespace",
		"wikitext": "*a\n\n[[Category:Bar]]<!--boo1--> <!--boo2-->\n[[Category:Baz]]<!--boo3--> <!--boo4-->\n[[es:Foo]]<!--boo5--> <!--boo6-->",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<!--boo1-->",
				"name": "comment"
			},
			{
				"text": "<!--boo2-->",
				"name": "comment"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<!--boo3-->",
				"name": "comment"
			},
			{
				"text": "<!--boo4-->",
				"name": "comment"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<!--boo5-->",
				"name": "comment"
			},
			{
				"text": "<!--boo6-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "No regressions on internal links following category (T174639)",
		"wikitext": "[[Category:Foo]]<div>a\n\n[[Foo]]</div>",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "11. Special case where only newlines separate links (T175416)",
		"wikitext": "[[Category:Foo]]\n\n[[Foo]][[es:Alimento]]\n\n[[Foo]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]][[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Alimento",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Category links with multiple namespaces",
		"wikitext": "[[Category:Project:Foo]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Project:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid: Serialize link to category page with colon escape",
		"wikitext": "[[:Category:Foo]]\n[[:Category:Foo|Bar]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid: Serialize link to file page with colon escape",
		"wikitext": "[[:File:Foo.png]]\n[[:File:Foo.png|Bar]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":File:Foo.png",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":File:Foo.png",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid: Serialize a genuine category link without colon escape",
		"wikitext": "[[Category:Foo]]\n[[Category:Foo|Bar]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Normalize hrefs properly before testing for invalid link targets (T72894)",
		"wikitext": "[[Category:Toxine bactérienne]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Toxine bactérienne",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Empty templates should be handled properly without being redlinked",
		"wikitext": "{{emptytemplate}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "emptytemplate",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Parsoid: Defaultsort",
		"wikitext": "{{DEFAULTSORT:Foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "DEFAULTSORT",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Foo",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Parsoid: Defaultsort variations (T236846)",
		"wikitext": "{{DEFAULTSORT}}\n\n{{DEFAULTSORT:}}\n{{DEFAULTSORT:DOGGIE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "DEFAULTSORT",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "DEFAULTSORT",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "DEFAULTSORT",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "DOGGIE",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Parsoid: Defaultsort (template-generated)",
		"wikitext": "{{{{1x|DEFAULTSORT}}:Foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "DEFAULTSORT",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": ":Foo",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "{{defaultsort}} should be location-independent (T353530)",
		"wikitext": "[[Category:Foo]]\n{{DEFAULTSORT:Bar}}\n[[Category:Bat]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "DEFAULTSORT",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Bar",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Bat",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Interlanguage links",
		"wikitext": "[[es:Alimento]]\n[[fr:Nourriture]]\n[[zh:食品]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Alimento",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "fr:Nourriture",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "zh:食品",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Duplicate interlanguage links (T26502)",
		"wikitext": "[[es:1]]\n[[es:2]]\n[[fr:1]]\n[[fr:2]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:1",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:2",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "fr:1",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "fr:2",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Single-line or multiline-comments can follow headings",
		"wikitext": "==foo==<!---->\n==bar==<!--c1-->\n==baz==<!--\nc2\nc3-->",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "foo",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "<!---->",
				"name": "comment"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "bar",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "baz",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "<!--",
				"name": "comment"
			},
			{
				"text": "c2",
				"name": "comment"
			},
			{
				"text": "c3-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "T3186 news: in the middle of text",
		"wikitext": "http://en.wikinews.org/wiki/Wikinews:Workplace",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "en.wikinews.org/wiki/Wikinews:Workplace",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "Namespaced link must have a title",
		"wikitext": "[[Project:]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Project:",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Namespaced link must have a title (bad fragment version)",
		"wikitext": "[[Project:#fragment]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Project:",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "fragment",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "div with no attributes",
		"wikitext": "<div>HTML rocks</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "div with double-quoted attribute",
		"wikitext": "<div id=\"rock\">HTML rocks</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"rock\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "div with single-quoted attribute",
		"wikitext": "<div id='rock'>HTML rocks</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "'rock'",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "div with unquoted attribute",
		"wikitext": "<div id=rock>HTML rocks</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "rock",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "div with illegal double attributes",
		"wikitext": "<div id=\"a\" id=\"b\">HTML rocks</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"a\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " id=",
				"name": "attributeName"
			},
			{
				"text": "\"b\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "div with empty attribute value, space before equals",
		"wikitext": "<div class =>HTML rocks</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "class =",
				"name": "attributeName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "div with multiple empty attribute values",
		"wikitext": "<div id= title=>HTML rocks</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "id= ",
				"name": "attributeName"
			},
			{
				"text": "title=",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Extension tag in attribute value",
		"wikitext": "<span title=\"<html><div>123</div></html>\">ok</span>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</span>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "table with multiple empty attribute values",
		"wikitext": "{| title= id=\n|hi\n|}",
		"nodes": [
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "title= ",
				"name": "definitionOperator"
			},
			{
				"text": "id=",
				"name": "mw-table-definition-value"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "div with braces in attribute value",
		"wikitext": "<div title=\"{}\">Foo</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"{}\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "div with empty attribute value, no space before equals",
		"wikitext": "<div class=>HTML rocks</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "class=",
				"name": "attributeName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "HTML multiple attributes correction",
		"wikitext": "<p class=\"error\" class=\"awesome\">Awesome!</p>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "p ",
				"name": "tagName"
			},
			{
				"text": "class=",
				"name": "attributeName"
			},
			{
				"text": "\"error\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " class=",
				"name": "attributeName"
			},
			{
				"text": "\"awesome\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Table multiple attributes correction",
		"wikitext": "{|\n!+ class=\"error\" class=\"awesome\"|status\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "+ class=\"error\" class=\"awesome\"",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "status",
				"name": "mw-strong"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "DIV IN UPPERCASE",
		"wikitext": "<DIV ID=\"x\">HTML ROCKS</DIV>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "DIV ",
				"name": "tagName"
			},
			{
				"text": "ID=",
				"name": "attributeName"
			},
			{
				"text": "\"x\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "DIV",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Non-ASCII pseudo-tags are rendered as text",
		"wikitext": "<khyô>",
		"nodes": []
	},
	{
		"desc": "Pseudo-tag with URL 'name' renders as url link",
		"wikitext": "<http://example.com/>",
		"nodes": []
	},
	{
		"desc": "text with amp in the middle of nowhere",
		"wikitext": "Remember AT&T?",
		"nodes": []
	},
	{
		"desc": "text with character entity: eacute",
		"wikitext": "I always thought &eacute; was a cute letter.",
		"nodes": [
			{
				"text": "&eacute;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "text with entity-escaped character entity-like string: eacute",
		"wikitext": "I always thought &amp;eacute; was a cute letter.",
		"nodes": [
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "text with undefined character entity: xacute",
		"wikitext": "I always thought &xacute; was a cute letter.",
		"nodes": [
			{
				"text": "&xacute;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "Text with HTML5 semicolon-less entity (should not decode)",
		"wikitext": "&ampamp;",
		"nodes": [
			{
				"text": "&ampamp;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "HTML5 tags",
		"wikitext": "<data value=\"5\">five</data>\n<time datetime=\"2000-01-01T00:00Z\">The new millenium started</time>\n<mark>This highlighted text</mark>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "data ",
				"name": "tagName"
			},
			{
				"text": "value=",
				"name": "attributeName"
			},
			{
				"text": "\"5\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "data",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "time ",
				"name": "tagName"
			},
			{
				"text": "datetime=",
				"name": "attributeName"
			},
			{
				"text": "\"2000-01-01T00:00Z\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "time",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "mark",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "mark",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "HTML tag with leading space is parsed as text",
		"wikitext": "< div>foo< /div>",
		"nodes": []
	},
	{
		"desc": "Element with broken attribute syntax",
		"wikitext": "<div style=\" style=\"123\">hi</div>\n<div =>ho</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\" style=\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "123\"",
				"name": "attributeName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "=",
				"name": "attributeName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Ensure that HTML adoption agency algorithm is properly implemented.",
		"wikitext": "<small>X<small>Y</small>Z</small>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Nesting of <kbd>",
		"wikitext": "<kbd>X<kbd>Y</kbd>Z</kbd>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "kbd",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "kbd",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "kbd",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "kbd",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Nesting of <em>",
		"wikitext": "<em>X<em>Y</em>Z</em>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "em",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "em",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "em",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "em",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Nesting of <strong>",
		"wikitext": "<strong>X<strong>Y</strong>Z</strong>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "strong",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "strong",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "strong",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "strong",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Nesting of <q>",
		"wikitext": "<q>X<q>Y</q>Z</q>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "q",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "q",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "q",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "q",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Nesting of <ruby>",
		"wikitext": "<ruby>X<ruby>Y</ruby>Z</ruby>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ruby",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ruby",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "ruby",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "ruby",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Nesting of <bdo>",
		"wikitext": "<bdo>X<bdo>Y</bdo>Z</bdo>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "bdo",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "bdo",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "bdo",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "bdo",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Media link",
		"wikitext": "[[Media:Foobar.jpg]]\n[[Media:Video.ogv]]\n[[:Media:Video.ogv]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Media:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Media:Video.ogv",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Media:Video.ogv",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Media link with text",
		"wikitext": "[[Media:Foobar.jpg|A neat file to look at]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Media:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "A neat file to look at",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Media link redirect",
		"wikitext": "[[Media:Redirect to foobar.jpg]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Media:Redirect to foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Media link with nasty text",
		"wikitext": "[[Media:Foobar.jpg|Safe Link<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Media:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Safe Link",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "div ",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "style=",
				"name": "mw-link-ground attributeName"
			},
			{
				"text": "display:none",
				"name": "mw-link-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "\" onmouseover=\"alert(document.cookie)\" onfoo=\"",
				"name": "mw-link-ground string"
			},
			{
				"text": "</",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Media link from missing resource (parsoid-only)",
		"wikitext": "[[Media:Foobar.jpg|Bat!]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Media:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Bat!",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Media link to nonexistent file (T3702)",
		"wikitext": "[[Media:No such.jpg]]\n[[Media:No_such file.jpg]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Media:No such.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Media:No_such file.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Media link with nested wikilinks",
		"wikitext": "[[Media:Foobar.jpg|[[Test]]]]\n[[Media:Foobar.jpg|[[File:Foobar.jpg]]]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Media:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Test",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Media:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Media link with multiple options",
		"wikitext": "[[Media:Foobar.jpg|123|345]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Media:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "123|345",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Character reference normalization in link text (T3938)",
		"wikitext": "[[Main Page|this&that]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "this&that",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "(T21451) Links should refer to the normalized form.",
		"wikitext": "[[&#xFB2E;]]\n[[&#x5d0;&#x5b7;]]\n[[&#x5d0;ַ]]\n[[א&#x5b7;]]\n[[אַ]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "&#xFB2E;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "&#x5d0;&#x5b7;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "&#x5d0;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "ַ",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "א",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "&#x5b7;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "אַ",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Empty attribute crash test (T4067)",
		"wikitext": "<font color=\"\">foo</font>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "font ",
				"name": "tagName"
			},
			{
				"text": "color=",
				"name": "attributeName"
			},
			{
				"text": "\"\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "font",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Empty attribute crash test single-quotes (T4067)",
		"wikitext": "<font color=''>foo</font>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "font ",
				"name": "tagName"
			},
			{
				"text": "color=",
				"name": "attributeName"
			},
			{
				"text": "''",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "font",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Attribute test: equals, then nothing",
		"wikitext": "<font color=>foo</font>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "font ",
				"name": "tagName"
			},
			{
				"text": "color=",
				"name": "attributeName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "font",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Attribute test: unquoted value",
		"wikitext": "<font color=x>foo</font>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "font ",
				"name": "tagName"
			},
			{
				"text": "color=",
				"name": "attributeName"
			},
			{
				"text": "x",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "font",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Attribute test: unquoted but illegal value (hash)",
		"wikitext": "<font color=#x>foo</font>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "font ",
				"name": "tagName"
			},
			{
				"text": "color=",
				"name": "attributeName"
			},
			{
				"text": "#x",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "font",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Attribute test: no value (T54330)",
		"wikitext": "<font color>foo</font>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "font ",
				"name": "tagName"
			},
			{
				"text": "color",
				"name": "attributeName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "font",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T4095: link with three closing brackets",
		"wikitext": "[[Main Page]]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T4095: link with pipe and three closing brackets",
		"wikitext": "[[Main Page|link]]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T4095: link with pipe and three closing brackets, version 2",
		"wikitext": "[[Main Page|[http://example.com/]]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[http://example.com/",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T4304: HTML attribute safety (safe template; regression T4309)",
		"wikitext": "<div title=\"{{test}}\"></div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "test",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T4304: HTML attribute safety (dangerous template; 2309)",
		"wikitext": "<div title=\"{{dangerous attribute}}\"></div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "dangerous attribute",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T4304: HTML attribute safety (dangerous style template; 2309)",
		"wikitext": "<div style=\"{{dangerous style attribute}}\"></div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "dangerous style attribute",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T4304: HTML attribute safety (safe parameter; 2309)",
		"wikitext": "{{div style|width: 200px}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "div style",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "width: 200px",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T4304: HTML attribute safety (unsafe parameter; 2309)",
		"wikitext": "{{div style|width: expression(alert(document.cookie))}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "div style",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "width: expression(alert(document.cookie))",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T4304: HTML attribute safety (unsafe breakout parameter; 2309)",
		"wikitext": "{{div style|\"><script>alert(document.cookie)</script>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "div style",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "\"><script>alert(document.cookie)</script>",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)",
		"wikitext": "{{div style|\" ><script>alert(document.cookie)</script>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "div style",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "\" ><script>alert(document.cookie)</script>",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T4304: HTML attribute safety (link)",
		"wikitext": "<div title=\"[[Main Page]]\"></div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"[[Main Page]]\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T4304: HTML attribute safety (italics)",
		"wikitext": "<div title=\"''foobar''\"></div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"''foobar''\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T4304: HTML attribute safety (bold)",
		"wikitext": "<div title=\"'''foobar'''\"></div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"'''foobar'''\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T4304: HTML attribute safety (web link)",
		"wikitext": "<div title=\"http://example.com/\"></div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"http://example.com/\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T4304: HTML attribute safety (named web link)",
		"wikitext": "<div title=\"[http://example.com/ link]\"></div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"[http://example.com/ link]\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T5244: HTML attribute safety (extension; safe)",
		"wikitext": "<div style=\"<nowiki>background:blue</nowiki>\"></div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "background:blue",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T5244: HTML attribute safety (extension; unsafe)",
		"wikitext": "<div style=\"<nowiki>border-left:expression(alert(document.cookie))</nowiki>\"></div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "border-left:expression(alert(document.cookie))",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "MSIE CSS safety test: spurious slash",
		"wikitext": "<div style=\"background-image:u\\rl(javascript:alert('boo'))\">evil</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"background-image:u\\rl(javascript:alert('boo'))\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "MSIE CSS safety test: hex code",
		"wikitext": "<div style=\"background-image:u\\72l(javascript:alert('boo'))\">evil</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"background-image:u\\72l(javascript:alert('boo'))\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "MSIE CSS safety test: comment in url",
		"wikitext": "<div style=\"background-image:u/**/rl(javascript:alert('boo'))\">evil</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"background-image:u/**/rl(javascript:alert('boo'))\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "MSIE CSS safety test: comment in expression",
		"wikitext": "<div style=\"background-image:expres/**/sion(alert('boo4'))\">evil4</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"background-image:expres/**/sion(alert('boo4'))\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)",
		"wikitext": "<p style=\"font-size: 100px; background-image:url\\b(https://www.google.com/images/srpr/logo6w.png)\">A</p>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "p ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"font-size: 100px; background-image:url\\b(https://www.google.com/images/srpr/logo6w.png)\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Opera -o-link CSS",
		"wikitext": "<div\ntitle=\"&#100;&#97;&#116;&#97;&#58;&#116;&#101;&#120;&#116;&#47;&#104;&#116;&#109;&#108;&#44;&#60;&#105;&#109;&#103;&#32;&#115;&#114;&#99;&#61;&#49;&#32;&#111;&#110;&#101;&#114;&#114;&#111;&#114;&#61;&#97;&#108;&#101;&#114;&#116;&#40;&#49;&#41;&#62;\"\nstyle=\"-o-link:attr(title);-o-link-source:current\">X</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "&#100;&#97;&#116;&#97;&#58;&#116;&#101;&#120;&#116;&#47;&#104;&#116;&#109;&#108;&#44;&#60;&#105;&#109;&#103;&#32;&#115;&#114;&#99;&#61;&#49;&#32;&#111;&#110;&#101;&#114;&#114;&#111;&#114;&#61;&#97;&#108;&#101;&#114;&#116;&#40;&#49;&#41;&#62;",
				"name": "mw-html-entity"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"-o-link:attr(title);-o-link-source:current\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Table attribute legitimate extension",
		"wikitext": "{|\n!+ style=\"<nowiki>color:blue</nowiki>\"|status\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "+ style=\"",
				"name": "mw-strong"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "color:blue",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "\"",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "status",
				"name": "mw-strong"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Table attribute safety",
		"wikitext": "{|\n!+ style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\"|status\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "+ style=\"",
				"name": "mw-strong"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "border-width:expression(0+alert(document.cookie))",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "\"",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "status",
				"name": "mw-strong"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "CSS line continuation 1",
		"wikitext": "<div style=\"background-image: u\\&#10;rl(test.jpg);\"></div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"background-image: u\\",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "&#10;",
				"name": "mw-html-entity"
			},
			{
				"text": "rl(test.jpg);\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "CSS line continuation 2",
		"wikitext": "<div style=\"background-image: u\\&#13;rl(test.jpg); \"></div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"background-image: u\\",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "&#13;",
				"name": "mw-html-entity"
			},
			{
				"text": "rl(test.jpg); \"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Allow aria attributes",
		"wikitext": "<span aria-describedby=\"id1\" aria-flowto=\"id2\" aria-hidden=\"true\" aria-label=\"id3\" aria-labelledby=\"id4\" aria-level=\"3\" aria-owns=\"id5\">foo</span>\n<span aria-bogus=\"stripped\">bar</span>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "aria-describedby=",
				"name": "attributeName"
			},
			{
				"text": "\"id1\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " aria-flowto=",
				"name": "attributeName"
			},
			{
				"text": "\"id2\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " aria-hidden=",
				"name": "attributeName"
			},
			{
				"text": "\"true\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " aria-label=",
				"name": "attributeName"
			},
			{
				"text": "\"id3\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " aria-labelledby=",
				"name": "attributeName"
			},
			{
				"text": "\"id4\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " aria-level=",
				"name": "attributeName"
			},
			{
				"text": "\"3\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " aria-owns=",
				"name": "attributeName"
			},
			{
				"text": "\"id5\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "aria-bogus=",
				"name": "attributeName"
			},
			{
				"text": "\"stripped\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Expansion of multi-line templates in attribute values (T8255)",
		"wikitext": "<div style=\"background: {{1x|#00FF00}}\">-</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"background: ",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "#00FF00",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Expansion of multi-line parser-functions in attribute values (T8255)",
		"wikitext": "<div style=\"background: {{#if:1|#00FF00|#FF00FF}}\">-</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"background: ",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "#00FF00",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "#FF00FF",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Expansion of multi-line templates in attribute values (T8255 check)",
		"wikitext": "<div style=\"background:\n#00FF00\">-</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"background:",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "#00FF00\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Expansion of multi-line templates in attribute values (T8255 check 2)",
		"wikitext": "<div style=\"background: &#10;#00FF00\">-</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"background: ",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "&#10;",
				"name": "mw-html-entity"
			},
			{
				"text": "#00FF00\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Tags which are hidden from tidiers cannot pass through the Sanitizer",
		"wikitext": "<mw:editsection><script>alert();</script></mw:editsection>\n\n<meta property=\"mw:PageProp/toc\" />",
		"nodes": []
	},
	{
		"desc": "Nested template calls",
		"wikitext": "{{Map-one-parameter|One-parameter|param}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Map-one-parameter",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "One-parameter",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "param",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Sanitizer: Closing of open tags",
		"wikitext": "<s></s><table></table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Sanitizer: Closing of open but not closed tags",
		"wikitext": "<s>foo",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Sanitizer: Closing of closed but not open tags",
		"wikitext": "</s>",
		"nodes": [
			{
				"text": "</s>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "Sanitizer: Closing of closed but not open table tags",
		"wikitext": "Table not started</td></tr></table>",
		"nodes": [
			{
				"text": "</td></tr></table>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=\"\"",
		"wikitext": "<span id=\"æ: v\">byte</span>[[#æ: v|backlink]]",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"æ: v\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "æ: v",
				"name": "mw-link-ground className"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "backlink",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=\"\" (legacy)",
		"wikitext": "<span id=\"æ: v\">byte</span>[[#æ: v|backlink]]",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"æ: v\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "æ: v",
				"name": "mw-link-ground className"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "backlink",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Sanitizer: Validating the contents of the id attribute (T6515)",
		"wikitext": "<br id=\"\" /><br id=\"a space\" />",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " ",
				"name": "attributeName"
			},
			{
				"text": "/><",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"a space\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " ",
				"name": "attributeName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Sanitizer: Validating the contents of the id attribute, empty attribute syntax (T6515)",
		"wikitext": "<br id />",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "id ",
				"name": "attributeName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Sanitizer: Validating id attribute uniqueness (T6515, T8301)",
		"wikitext": "<br id=\"foo\" /><br id=\"foo\" />",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"foo\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " ",
				"name": "attributeName"
			},
			{
				"text": "/><",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"foo\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " ",
				"name": "attributeName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Sanitizer: Validating that <meta> and <link> work, but only for Microdata",
		"wikitext": "<div itemscope>\n\t<meta itemprop=\"hello\" content=\"world\">\n\t<meta http-equiv=\"refresh\" content=\"5\">\n\t<meta itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\">\n\t<link itemprop=\"hello\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" itemprop=\"hello\" href=\"{{SERVER}}\">\n</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "itemscope",
				"name": "attributeName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SERVER",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SERVER",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SERVER",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Sanitizer: Strip comments from CSS attributes",
		"wikitext": "<span style=\"margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)\">2013</span>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Sanitizer: Avoid unnecessary percent encoded characters in interwiki links",
		"wikitext": "[[meatball:Soft\"Security]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:Soft\"Security",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Sanitizer: angle brackets are invalid, even in interwiki links (T182338)",
		"wikitext": "[[meatball:Foo<Bar]]\n[[meatball:Foo>Bar]]\n[[meatball:Foo&lt;bar]]\n[[meatball:Foo&gt;bar]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:Foo<Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:Foo>Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "&lt;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "&gt;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Self closed html pairs (T7487)",
		"wikitext": "<center><font id=\"bug\" />Centered text</center>\n<div><font id=\"bug2\" />In div text</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "center",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "font ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"bug\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " ",
				"name": "attributeName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "center",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "font ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"bug2\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " ",
				"name": "attributeName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Punctuation: nbsp before exclamation",
		"wikitext": "C'est grave !",
		"nodes": []
	},
	{
		"desc": "Punctuation: CSS !important (T13874)",
		"wikitext": "<div style=\"width:50% !important\">important</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"width:50% !important\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Punctuation: CSS ! important (T13874; with space after)",
		"wikitext": "<div style=\"width:50% ! important\">important</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"width:50% ! important\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "HTML bullet list, closed tags (T7497)",
		"wikitext": "<ul>\n<li>One</li>\n<li>Two</li>\n</ul>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "HTML bullet list, unclosed tags (T7497)",
		"wikitext": "<ul>\n<li>One\n<li>Two\n</ul>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</ul>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "HTML ordered list, closed tags (T7497)",
		"wikitext": "<ol>\n<li>One</li>\n<li>Two</li>\n</ol>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ol",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "ol",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "HTML ordered list, unclosed tags (T7497)",
		"wikitext": "<ol>\n<li>One\n<li>Two\n</ol>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ol",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</ol>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "HTML nested bullet list, closed tags (T7497)",
		"wikitext": "<ul>\n<li>One</li>\n<li>Two:\n<ul>\n<li>Sub-one</li>\n<li>Sub-two</li>\n</ul>\n</li>\n</ul>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "HTML nested bullet list, open tags (T7497)",
		"wikitext": "<ul>\n<li>One\n<li>Two:\n<ul>\n<li>Sub-one\n<li>Sub-two\n</ul>\n</ul>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</ul>",
				"name": "mw-error"
			},
			{
				"text": "</ul>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "HTML nested ordered list, closed tags (T7497)",
		"wikitext": "<ol>\n<li>One</li>\n<li>Two:\n<ol>\n<li>Sub-one</li>\n<li>Sub-two</li>\n</ol>\n</li>\n</ol>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ol",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ol",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "ol",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "ol",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "HTML nested ordered list, open tags (T7497)",
		"wikitext": "<ol>\n<li>One\n<li>Two:\n<ol>\n<li>Sub-one\n<li>Sub-two\n</ol>\n</ol>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ol",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ol",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</ol>",
				"name": "mw-error"
			},
			{
				"text": "</ol>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "HTML ordered list item with parameters oddity",
		"wikitext": "<ol><li id=\"fragment\">One</li>\n</ol>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ol",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "li ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"fragment\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "ol",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T7918: autonumbering",
		"wikitext": "[http://first/] [http://second] [ftp://ftp]\n\nftp://inlineftp\n\n[mailto:enclosed@mail.tld With target]\n\n[mailto:enclosed@mail.tld]\n\nmailto:inline@mail.tld",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "first/",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "second",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "ftp://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "ftp",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "ftp://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "inlineftp",
				"name": "mw-free-extlink"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "mailto:",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "enclosed@mail.tld",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "With target",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "mailto:",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "enclosed@mail.tld",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "mailto:",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "inline@mail.tld",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "Fuzz testing: Parser13",
		"wikitext": "{| \n| http://a|",
		"nodes": [
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			}
		]
	},
	{
		"desc": "Fuzz testing: Parser16",
		"wikitext": "{|\n!https://||||||",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "https://",
				"name": "mw-strong"
			},
			{
				"text": "||||||",
				"name": "typeOperator"
			}
		]
	},
	{
		"desc": "Fuzz testing: Parser21",
		"wikitext": "{|\n!irc://{{ftp://a\" onmouseover=\"alert('hello world');\"\n|",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "irc://",
				"name": "mw-strong"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "ftp://a\" onmouseover=\"alert('hello world');\"",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			}
		]
	},
	{
		"desc": "Fuzz testing: Parser22",
		"wikitext": "http://===r:::https://b\n\n{|",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "===r:::https://b",
				"name": "mw-free-extlink"
			},
			{
				"text": "{|",
				"name": "null"
			}
		]
	},
	{
		"desc": "Fuzz testing: Parser24 (minimized)",
		"wikitext": "{{<u {{{{[[Sx-->}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "u ",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template3-ground bracket"
			},
			{
				"text": "[[Sx-->",
				"name": "mw-template3-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template3-ground bracket"
			}
		]
	},
	{
		"desc": "Fuzz testing: Parser24",
		"wikitext": "{|\n{{{|\n<u CLASS=\n| {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >\n<br style=\"onmouseover='alert(document.cookie);' \" />\n\nMOVE YOUR MOUSE CURSOR OVER THIS TEXT\n|",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{{",
				"name": "brace"
			},
			{
				"text": "|",
				"name": "mw-templatevariable-delimiter"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "u ",
				"name": "tagName"
			},
			{
				"text": "CLASS=",
				"name": "attributeName"
			},
			{
				"text": "| ",
				"name": "attributeName"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "<",
				"name": "mw-template2-ground angleBracket"
			},
			{
				"text": "noinclude",
				"name": "mw-template2-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template2-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": " ",
				"name": "attributeName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"onmouseover='alert(document.cookie);' \"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " ",
				"name": "attributeName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "MOVE YOUR MOUSE CURSOR OVER THIS TEXT",
				"name": "atom"
			},
			{
				"text": "|",
				"name": "atom"
			}
		]
	},
	{
		"desc": "Fuzz testing: Parser25 (T8055)",
		"wikitext": "{{{\n| \n<LI CLASS=||\n >\n}}}blah\" onmouseover=\"alert('hello world');\" align=\"left\"'''MOVE MOUSE CURSOR OVER HERE",
		"nodes": [
			{
				"text": "{{{",
				"name": "brace"
			},
			{
				"text": "|",
				"name": "mw-templatevariable-delimiter"
			},
			{
				"text": " ",
				"name": "atom"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "LI ",
				"name": "tagName"
			},
			{
				"text": "CLASS=",
				"name": "attributeName"
			},
			{
				"text": "||",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " ",
				"name": "attributeName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "}}}",
				"name": "brace"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "MOVE MOUSE CURSOR OVER HERE",
				"name": "mw-strong"
			}
		]
	},
	{
		"desc": "Fuzz testing: URL adjacent extension (with space, clean)",
		"wikitext": "http://example.com <nowiki>junk</nowiki>",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "junk",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Fuzz testing: URL adjacent extension (no space, dirty; nowiki)",
		"wikitext": "http://example.com<nowiki>junk</nowiki>",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "junk",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Fuzz testing: URL adjacent extension (no space, dirty; pre)",
		"wikitext": "http://example.com<pre>junk</pre>",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "junk",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "Fuzz testing: encoded newline in generated HTML replacements (T8577)",
		"wikitext": "<pre dir=\"&#10;\"></pre>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre ",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": "dir=",
				"name": "mw-exttag-attribute mw-ext-pre"
			},
			{
				"text": "\"&#10;\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": "></",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)",
		"wikitext": "<pre dir=\"\n\"></pre>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre ",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": "dir=",
				"name": "mw-exttag-attribute mw-ext-pre"
			},
			{
				"text": "\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": "\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": "></",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "Templates in extension attributes are not expanded",
		"wikitext": "<pre dir=\"{{1x|ltr}}\"></pre>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre ",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": "dir=",
				"name": "mw-exttag-attribute mw-ext-pre"
			},
			{
				"text": "\"{{1x|ltr}}\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": "></",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "Parsing optional HTML elements (T8171)",
		"wikitext": "<table>\n  <tr>\n    <td> Some tabular data</td>\n    <td> More tabular data ...\n    <td> And yet som tabular data</td>\n  </tr>\n</table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "</tr>",
				"name": "mw-error"
			},
			{
				"text": "</table>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "Correct handling of <td>, <tr> (T8171)",
		"wikitext": "<table>\n  <tr>\n    <td> Some tabular data</td>\n    <td> More tabular data ...</td>\n    <td> And yet som tabular data</td>\n  </tr>\n</table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Parsing crashing regression (fr:JavaScript)",
		"wikitext": "</body></x>",
		"nodes": []
	},
	{
		"desc": "Inline wiki vs wiki block nesting",
		"wikitext": "'''Bold paragraph\n\nNew wiki paragraph",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "Bold paragraph",
				"name": "mw-strong"
			}
		]
	},
	{
		"desc": "Inline HTML vs wiki block nesting",
		"wikitext": "<b>Bold paragraph\n\nNew wiki paragraph",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Mixing markup for italics and bold",
		"wikitext": "'''bold''''''bold''bolditalics'''''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "bold'",
				"name": "mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "bold",
				"name": "mw-strong"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "bolditalics",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Special page transclusion",
		"wikitext": "{{Special:Prefixindex/Xyzzyx}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Special:Prefixindex/Xyzzyx",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Special page transclusion twice (T7021)",
		"wikitext": "{{Special:Prefixindex/Xyzzyx}}\n{{Special:Prefixindex/Xyzzyx}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Special:Prefixindex/Xyzzyx",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Special:Prefixindex/Xyzzyx",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Nested special page transclusion",
		"wikitext": "{{nested special}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "nested special",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Transclusion of default MediaWiki message",
		"wikitext": "{{MediaWiki:Mainpage}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "MediaWiki:Mainpage",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Transclusion of nonexistent MediaWiki message",
		"wikitext": "{{MediaWiki:Mainpagexxx}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "MediaWiki:Mainpagexxx",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Transclusion of MediaWiki message with underscore",
		"wikitext": "{{MediaWiki:history_short}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "MediaWiki:history_short",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Transclusion of MediaWiki message with space",
		"wikitext": "{{MediaWiki:history short}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "MediaWiki:history short",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Invalid header with following text",
		"wikitext": "= x = y",
		"nodes": []
	},
	{
		"desc": "Section extraction test (section 0)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction test (section 1)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction test (section 2)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction test (section 3)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction test (section 4)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction test (section 5)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction test (section 6)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction test (section 7)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction test (section 8)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction test (section 9)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction test (section 10)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction test (nonexistent section 11)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction test with bogus heading (section 1)",
		"wikitext": "==a==\n==bogus== not a legal section\n==b==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction test with bogus heading (section 2)",
		"wikitext": "==a==\n==bogus== not a legal section\n==b==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction test with comment after heading (section 1)",
		"wikitext": "==a==\n==b== <!-- -->\n==c==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "== ",
				"name": "heading"
			},
			{
				"text": "<!-- -->",
				"name": "comment"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction test with comment after heading (section 2)",
		"wikitext": "==a==\n==b== <!-- -->\n==c==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "== ",
				"name": "heading"
			},
			{
				"text": "<!-- -->",
				"name": "comment"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction test with bogus <nowiki> heading (section 1)",
		"wikitext": "==a==\n==bogus== <nowiki>not a legal section</nowiki>\n==b==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "not a legal section",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction test with bogus <nowiki> heading (section 2)",
		"wikitext": "==a==\n==bogus== <nowiki>not a legal section</nowiki>\n==b==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "not a legal section",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction prefixed by comment (section 1)",
		"wikitext": "<!-- -->==sec1==\n==sec2==",
		"nodes": [
			{
				"text": "<!-- -->",
				"name": "comment"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "sec2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction prefixed by comment (section 2)",
		"wikitext": "<!-- -->==sec1==\n==sec2==",
		"nodes": [
			{
				"text": "<!-- -->",
				"name": "comment"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "sec2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction, mixed wiki and html (section 1)",
		"wikitext": "<h2>unmarked</h2>\nunmarked\n==1==\none\n==2==\ntwo",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "h2",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "h2",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "1",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction, mixed wiki and html (section 2)",
		"wikitext": "<h2>unmarked</h2>\nunmarked\n==1==\none\n==2==\ntwo",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "h2",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "h2",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "1",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction, heading surrounded by <noinclude>",
		"wikitext": "<noinclude>==unmarked==</noinclude>\n==marked==",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "marked",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Sectiion with all-equals",
		"wikitext": "=== \nThe line above must have a trailing space\n=== <!--\n--> <!-- -->\nBut just in case it doesn't...",
		"nodes": [
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "=",
				"name": "mw-section"
			},
			{
				"text": "= ",
				"name": "heading"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "=",
				"name": "mw-section"
			},
			{
				"text": "= ",
				"name": "heading"
			},
			{
				"text": "<!--",
				"name": "comment"
			},
			{
				"text": "-->",
				"name": "comment"
			},
			{
				"text": "<!-- -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Section replacement test (section 0)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section replacement test (section 1)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section replacement test (section 2)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section replacement test (section 3)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section replacement test (section 4)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section replacement test (section 5)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section replacement test (section 6)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section replacement test (section 7)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section replacement test (section 8)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section replacement test (section 9)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section replacement test (section 10)",
		"wikitext": "start\n==a==\n===aa===\n====aaa====\n==b==\n===ba===\n===bb===\n====bba====\n===bc===\n==c==\n===ca===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "aa",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "aaa",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ba",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bb",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "bba",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "bc",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "ca",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section replacement test with initial whitespace (T15728)",
		"wikitext": " Preformatted initial line\n==a==\n===a===",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section extraction, heading followed by pre with 20 spaces (T8398)",
		"wikitext": "==a==\n                    a",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "Section extraction, heading followed by pre with 19 spaces (T8398 check)",
		"wikitext": "==a==\n                   a",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "Section extraction, <pre> around bogus header (T12309)",
		"wikitext": "== Section One ==\n<pre>\n=======\n</pre>\n\n== Section Two ==\nstuff",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " Section One ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "=======",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " Section Two ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section replacement, <pre> around bogus header (T12309)",
		"wikitext": "== Section One ==\n<pre>\n=======\n</pre>\n\n== Section Two ==\nstuff",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " Section One ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "=======",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " Section Two ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Handling of &#x0A; in URLs",
		"wikitext": "*irc://&#x0A;a",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "&#x0A;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "Handling of %0A in URLs",
		"wikitext": "*irc://%0Aa",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "5 quotes, code coverage +1 line",
		"wikitext": "'''''",
		"nodes": [
			{
				"text": "'''''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Special:Search page linking.",
		"wikitext": "{{Special:search}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Special:search",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "{{!}} is a magic word",
		"wikitext": "{{!}} is a magic word there and {{!}} is still a magic word here\n| is not a magic word here but {{!}} is still a magic word here",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Single {{!}} in table cell",
		"wikitext": "{|\n| colspan=\"1\" |foo {{!}} bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "1. Using {{!}} in wikilinks (T290526)",
		"wikitext": "[[Main Page{{!}}Something else]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "{{",
				"name": "mw-ext-link-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-link-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-link-ground paren"
			},
			{
				"text": "Something else",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "2. Using {{!}} in wikilinks (T290526)",
		"wikitext": "[[{{T290526}}]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "T290526",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Using {{!}} in template arguments (T290526)",
		"wikitext": "{{1x|Main Page{{!}}Something else}}\n\n{{1x|{{T290526}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Main Page",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "Something else",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "T290526",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Using {{!}} in template arguments, part 2 (T290526)",
		"wikitext": "{{ Main Page|Something else }}\n\n{{ {{T290526}} }}",
		"nodes": [
			{
				"text": "{{ ",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Main Page",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Something else ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{ ",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "T290526",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": " }}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Say the magic word",
		"wikitext": "*{{PAGENAME}}\n*{{PAGENAMEE}}\n*{{FULLPAGENAME}}\n*{{FULLPAGENAMEE}}\n*{{BASEPAGENAME}}\n*{{BASEPAGENAMEE}}\n*{{SUBPAGENAME}}\n*{{SUBPAGENAMEE}}\n*{{ROOTPAGENAME}}\n*{{ROOTPAGENAMEE}}\n*{{TALKPAGENAME}}\n*{{TALKPAGENAMEE}}\n*{{SUBJECTPAGENAME}}\n*{{SUBJECTPAGENAMEE}}\n*{{NAMESPACEE}}\n*{{NAMESPACE}}\n*{{NAMESPACENUMBER}}\n*{{TALKSPACE}}\n*{{TALKSPACEE}}\n*{{SUBJECTSPACE}}\n*{{SUBJECTSPACEE}}\n*{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PAGENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PAGENAMEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "FULLPAGENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "FULLPAGENAMEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "BASEPAGENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "BASEPAGENAMEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SUBPAGENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SUBPAGENAMEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "ROOTPAGENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "ROOTPAGENAMEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "TALKPAGENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "TALKPAGENAMEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SUBJECTPAGENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SUBJECTPAGENAMEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "NAMESPACEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "NAMESPACE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "NAMESPACENUMBER",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "TALKSPACE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "TALKSPACEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SUBJECTSPACE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SUBJECTSPACEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Dynamic",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "NUMBEROFUSERS",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "NUMBEROFPAGES",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "CURRENTVERSION",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "CONTENTLANGUAGE",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "DIRECTIONMARK",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "CURRENTTIMESTAMP",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "NUMBEROFARTICLES",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "HTML Hex character encoding (spells the word \"JavaScript\")",
		"wikitext": "&#x4A;&#x061;&#x0076;&#x00061;&#x000053;&#x0000063;&#114;&#x0000069;&#00000112;&#x0000000074;",
		"nodes": [
			{
				"text": "&#x4A;&#x061;&#x0076;&#x00061;&#x000053;&#x0000063;&#114;&#x0000069;&#00000112;&#x0000000074;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "HTML Hex character encoding bogus encoding (T28437 regression check)",
		"wikitext": "&#xsee;&#XSEE;",
		"nodes": []
	},
	{
		"desc": "HTML Hex character encoding mixed case",
		"wikitext": "&#xEE;&#Xee;",
		"nodes": [
			{
				"text": "&#xEE;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "Illegal character references (T106578, T113194)",
		"wikitext": "; Null: &#00;\n; FF: &#xC;\n; CR: &#xD;\n; Control (low): &#8;\n; Control (high): &#x7F; &#x9F;\n; Unsupported legacy: &#128; &#130; &#131; &#150; &#159;\n; Surrogate: &#xD83D;&#xDCA9;\n; Invalid characters: &#xfffe; &#xffff;\n; This is an okay astral character: &#x1F4A9;\n; This is an okay multi-codepoint HTML5 entity: &acE;\n; This are valid wikitext-specific entities: &רלמ; &رلم;\n; Highest valid characters: &#x10fffd; &#x10fffe; &#x10ffff;",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": " Null",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "&#00;",
				"name": "mw-html-entity"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": " FF",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "&#xC;",
				"name": "mw-html-entity"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": " CR",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "&#xD;",
				"name": "mw-html-entity"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": " Control (low)",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "&#8;",
				"name": "mw-html-entity"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": " Control (high)",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "&#x7F;",
				"name": "mw-html-entity"
			},
			{
				"text": "&#x9F;",
				"name": "mw-html-entity"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": " Unsupported legacy",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "&#128;",
				"name": "mw-html-entity"
			},
			{
				"text": "&#130;",
				"name": "mw-html-entity"
			},
			{
				"text": "&#131;",
				"name": "mw-html-entity"
			},
			{
				"text": "&#150;",
				"name": "mw-html-entity"
			},
			{
				"text": "&#159;",
				"name": "mw-html-entity"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": " Surrogate",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "&#xD83D;&#xDCA9;",
				"name": "mw-html-entity"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": " Invalid characters",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "&#xfffe;",
				"name": "mw-html-entity"
			},
			{
				"text": "&#xffff;",
				"name": "mw-html-entity"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": " This is an okay astral character",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "&#x1F4A9;",
				"name": "mw-html-entity"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": " This is an okay multi-codepoint HTML5 entity",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "&acE;",
				"name": "mw-html-entity"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": " This are valid wikitext-specific entities",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": " Highest valid characters",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "&#x10fffd;",
				"name": "mw-html-entity"
			},
			{
				"text": "&#x10fffe;",
				"name": "mw-html-entity"
			},
			{
				"text": "&#x10ffff;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "Another italics / bold test",
		"wikitext": " ''' ''x'",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": " ",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "dt/dd/dl test",
		"wikitext": ":;;;::",
		"nodes": [
			{
				"text": ":;;;::",
				"name": "list"
			}
		]
	},
	{
		"desc": "[Before] HTML without raw HTML enabled ($wgRawHtml==false)",
		"wikitext": "<html><script>alert(1);</script></html>",
		"nodes": []
	},
	{
		"desc": "HTML with raw HTML ($wgRawHtml==true)",
		"wikitext": "<html><script>alert(1);</script></html>",
		"nodes": []
	},
	{
		"desc": "Empty tag w/ raw HTML ($wgRawHtml==true)",
		"wikitext": "<html />",
		"nodes": []
	},
	{
		"desc": "Parents of subpages, one level up",
		"wikitext": "[[../|L2]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "../",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "L2",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parents of subpages, one level up, not named",
		"wikitext": "[[../]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "../",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parents of subpages, two levels up",
		"wikitext": "[[../../|L1]]2\n\n[[../../|L1]]l",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "../../",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "L1",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "../../",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "L1",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parents of subpages, two levels up, without trailing slash or name.",
		"wikitext": "[[../..]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "../..",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parents of subpages, two levels up, with lots of extra trailing slashes.",
		"wikitext": "[[../../////]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "../../////",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Transclusion of a sibling page (one level up)",
		"wikitext": "{{../L3Sibling}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "../L3Sibling",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Transclusion of a child page",
		"wikitext": "{{/L3Sibling}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "/L3Sibling",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Non-transclusion because of too many up levels",
		"wikitext": "{{../../../../More than parent}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "../../../../More than parent",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Definition list code coverage",
		"wikitext": ";title   :def\n;title :def\n;title:def",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "title   ",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "title ",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "title",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "Don't fall for the self-closing div",
		"wikitext": "<div>hello world</div/>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			}
		]
	},
	{
		"desc": "MSGNW magic word",
		"wikitext": "{{MSGNW:msg}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "MSGNW",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "msg",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "RAW magic word",
		"wikitext": "{{RAW:QUERTY}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "RAW:QUERTY",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Always escape literal '>' in output, not just after '<'",
		"wikitext": "><>",
		"nodes": []
	},
	{
		"desc": "Template caching",
		"wikitext": "{{Test}}\n{{Test}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Test",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Test",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "anchorencode",
		"wikitext": "{{anchorencode:foo bar©#%n}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "anchorencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "foo bar©#%n",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "anchorencode (legacy)",
		"wikitext": "{{anchorencode:foo bar©#%n}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "anchorencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "foo bar©#%n",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "anchorencode trims spaces",
		"wikitext": "{{anchorencode: __pretty__please__}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "anchorencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " __pretty__please__",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "anchorencode deals with links",
		"wikitext": "{{anchorencode: [[hello|world]] [[hi]]}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "anchorencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "[[",
				"name": "mw-ext-link-ground squareBracket"
			},
			{
				"text": "hello",
				"name": "mw-ext-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-ext-link-ground operator"
			},
			{
				"text": "world",
				"name": "mw-ext-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-ext-link-ground squareBracket"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "[[",
				"name": "mw-ext-link-ground squareBracket"
			},
			{
				"text": "hi",
				"name": "mw-ext-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-ext-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "anchorencode deals with templates",
		"wikitext": "{{anchorencode: {{Foo}} x}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "anchorencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground bracket"
			},
			{
				"text": "Foo",
				"name": "mw-template-ext-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground bracket"
			},
			{
				"text": " x",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "anchorencode encodes like the TOC generator: (T20431)",
		"wikitext": "===_ +:.3A%3A _ &&amp;]] x===\n{{anchorencode: _ +:.3A%3A _ &&amp;]] x}}\n\n__NOEDITSECTION__",
		"nodes": [
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "_ +:.3A%3A _ &",
				"name": "mw-section"
			},
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "]] x",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "anchorencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " _ +:.3A%3A _ &",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "&amp;",
				"name": "mw-ext-ground mw-html-entity"
			},
			{
				"text": "]] x",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "__NOEDITSECTION__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "anchorencode encodes like the TOC generator: (T20431) (legacy)",
		"wikitext": "===_ +:.3A%3A&&amp;]]===\n{{anchorencode: _ +:.3A%3A&&amp;]] }}\n__NOEDITSECTION__",
		"nodes": [
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "_ +:.3A%3A&",
				"name": "mw-section"
			},
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "]]",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "anchorencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " _ +:.3A%3A&",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "&amp;",
				"name": "mw-ext-ground mw-html-entity"
			},
			{
				"text": "]] ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "__NOEDITSECTION__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "T8200: blockquotes and paragraph formatting",
		"wikitext": "<blockquote>\nfoo\n</blockquote>\n\nbar\n\n baz",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "T10293: Use of center tag ruins paragraph formatting",
		"wikitext": "<center>\nfoo\n</center>\n\nbar\n\n baz",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "center",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "center",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "Parsing of overlapping (improperly nested) inline html tags",
		"wikitext": "<span><s>x</span></s>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</span></s>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "T2529: Uncovered bullet",
		"wikitext": "*Foo {{bullet}}",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "bullet",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T2529: Uncovered bullet in a deeply nested list",
		"wikitext": "*******Foo {{bullet}}",
		"nodes": [
			{
				"text": "*******",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "bullet",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T2529: Uncovered table already at line-start",
		"wikitext": "x\n\n{{table}}\ny",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T2529: Uncovered bullet in parser function result",
		"wikitext": "*Foo{{lc:{{bullet}} }}",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "lc",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground bracket"
			},
			{
				"text": "bullet",
				"name": "mw-template-ext-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground bracket"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "T7678: Double-parsed template argument",
		"wikitext": "{{lc:{{{1}}}|hello}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "lc",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "{{{",
				"name": "mw-ext-ground brace"
			},
			{
				"text": "1",
				"name": "mw-ext-ground variableName"
			},
			{
				"text": "}}}",
				"name": "mw-ext-ground brace"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "hello",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "T7678: Double-parsed template invocation",
		"wikitext": "{{lc:{{paramtest {{!}} param = hello }} }}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "lc",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground bracket"
			},
			{
				"text": "paramtest ",
				"name": "mw-template-ext-ground moduleKeyword"
			},
			{
				"text": "{{",
				"name": "mw-template-ext2-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext2-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext2-ground paren"
			},
			{
				"text": " param = hello",
				"name": "mw-template-ext-ground moduleKeyword"
			},
			{
				"text": " }}",
				"name": "mw-template-ext-ground bracket"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Paragraphs inside divs (no extra line breaks)",
		"wikitext": "<div>Line one\n\nLine two</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Paragraphs inside divs (extra line break on open)",
		"wikitext": "<div>\nLine one\n\nLine two</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Paragraphs inside divs (extra line break on close)",
		"wikitext": "<div>Line one\n\nLine two\n</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Paragraphs inside divs (extra line break on open and close)",
		"wikitext": "<div>\nLine one\n\nLine two\n</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Nesting tags, paragraphs on lines which begin with <div>",
		"wikitext": "<div></div><strong>A\nB</strong>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "strong",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "strong",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T8200: paragraphs inside blockquotes (no extra line breaks)",
		"wikitext": "<blockquote>Line one\n\nLine two</blockquote>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T8200: paragraphs inside blockquotes (extra line break on open)",
		"wikitext": "<blockquote>\nLine one\n\nLine two</blockquote>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T8200: paragraphs inside blockquotes (extra line break on close)",
		"wikitext": "<blockquote>Line one\n\nLine two\n</blockquote>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T8200: paragraphs inside blockquotes (extra line break on open and close)",
		"wikitext": "<blockquote>\nLine one\n\nLine two\n</blockquote>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Paragraphs inside blockquotes/divs (no extra line breaks)",
		"wikitext": "<blockquote><div>Line one\n\nLine two</div></blockquote>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Paragraphs inside blockquotes/divs (extra line break on open)",
		"wikitext": "<blockquote><div>\nLine one\n\nLine two</div></blockquote>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Paragraphs inside blockquotes/divs (extra line break on close)",
		"wikitext": "<blockquote><div>Line one\n\nLine two\n</div></blockquote>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Paragraphs inside blockquotes/divs (extra line break on open and close)",
		"wikitext": "<blockquote><div>\nLine one\n\nLine two\n</div></blockquote>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Interwiki links trounced by handleExternalLinks after early LinkHolderArray expansion",
		"wikitext": "[[meatball:1]]\n[[meatball:2]]\n[[meatball:3]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:1",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:2",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:3",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Multibyte character in padleft",
		"wikitext": "{{padleft:-Hello|7|Æ}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "padleft",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-Hello",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "7",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Æ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Multibyte character in padright",
		"wikitext": "{{padright:Hello-|7|Æ}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "padright",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Hello-",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "7",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Æ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "formatdate parser function",
		"wikitext": "{{#formatdate:2009-03-24}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#formatdate",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2009-03-24",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "formatdate parser function, with default format",
		"wikitext": "{{#formatdate:2009-03-24|mdy}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#formatdate",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2009-03-24",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "mdy",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Spacing of numbers in formatted dates",
		"wikitext": "{{#formatdate:January 15}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#formatdate",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "January 15",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "formatdate with invalid month",
		"wikitext": "{{#formatdate:2019-22-22|dmy}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#formatdate",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2019-22-22",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "dmy",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "formatdate uses correct capitalisation in English",
		"wikitext": "{{#formatdate:june 3|dmy}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#formatdate",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "june 3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "dmy",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "formatdate formats ISO year 0 as 1 BC",
		"wikitext": "{{#formatdate:-0001-12-31|mdy}}\n{{#formatdate:0000-12-31|mdy}}\n{{#formatdate:0001-12-31|mdy}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#formatdate",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-0001-12-31",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "mdy",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#formatdate",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "0000-12-31",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "mdy",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#formatdate",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "0001-12-31",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "mdy",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Edit comment with link",
		"wikitext": "I like the [[Main Page]] a lot",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Edit comment with link and link text",
		"wikitext": "I like the [[Main Page|best pages]] a lot",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "best pages",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Edit comment with link and link text with suffix",
		"wikitext": "I like the [[Main Page|best page]]s a lot",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "best page",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Edit comment with section link (non-local, eg in history list)",
		"wikitext": "/* External links */ removed bogus entries",
		"nodes": []
	},
	{
		"desc": "Edit comment with section link and text before it (non-local, eg in history list)",
		"wikitext": "pre-comment text /* External links */ removed bogus entries",
		"nodes": []
	},
	{
		"desc": "Edit comment with section link (local, eg in diff view)",
		"wikitext": "/* External links */ removed bogus entries",
		"nodes": []
	},
	{
		"desc": "Edit comment with section link that has a link in it",
		"wikitext": "/* [[A link]] */",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "A link",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Edit comment with section link that has a template in it",
		"wikitext": "/* {{foobar|param}} */",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "foobar",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "param",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Edit comment with subpage link (T16080)",
		"wikitext": "Poked at a [[/subpage]] here...",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "/subpage",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Edit comment with subpage link and link text (T16080)",
		"wikitext": "Poked at a [[/subpage|neat little page]] here...",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "/subpage",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "neat little page",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Edit comment with bogus subpage link in non-subpage NS (T16080)",
		"wikitext": "Poked at a [[/subpage]] here...",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "/subpage",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Edit comment with bare anchor link (local, as on diff)",
		"wikitext": "[[#section]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "section",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Edit comment with bare anchor link (non-local, as on history)",
		"wikitext": "[[#section]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "section",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Anchor starting with underscore",
		"wikitext": "[[#_ref|One]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "_ref",
				"name": "mw-link-ground className"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "One",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Id starting with underscore",
		"wikitext": "<div id=\"_ref\"></div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"_ref\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Edit comment with link with more than one pipe (T99346)",
		"wikitext": "[[Main Page|Many|pipes]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Many|pipes",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Complex edit comment with link with more than one pipe (T99346)",
		"wikitext": "Created page with \"<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo...\"",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Requests for permissions/Bot",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{{",
				"name": "mw-ext-link-ground paren"
			},
			{
				"text": "subst",
				"name": "mw-ext-link-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "#titleparts",
				"name": "mw-ext-link-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "{{",
				"name": "mw-ext2-link-ground paren"
			},
			{
				"text": "subst",
				"name": "mw-ext2-link-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext2-link-ground punctuation"
			},
			{
				"text": "PAGENAME",
				"name": "mw-ext2-link-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext2-link-ground paren"
			},
			{
				"text": "|",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "3",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-link-ground paren"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "User:MineoBot",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Request for permissions/links",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Mineo...\"",
				"name": "mw-template-ground attributeValue"
			}
		]
	},
	{
		"desc": "Space normalisation on autocomment (T24784)",
		"wikitext": "/* __hello__world__ */",
		"nodes": []
	},
	{
		"desc": "percent-encoding and + signs in comments (T28410)",
		"wikitext": "[[ABC%33D% ++]] [[ABC%33D% ++|+%20]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "ABC%33D% ++",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "ABC%33D% ++",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "+%20",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Verify that displaytitle works (T24501) no displaytitle",
		"wikitext": "this is not the title",
		"nodes": []
	},
	{
		"desc": "Verify that displaytitle works (T24501) RestrictDisplayTitle=false",
		"wikitext": "this is not the title\n{{DISPLAYTITLE:whatever}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "DISPLAYTITLE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "whatever",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch",
		"wikitext": "this is not the title\n{{DISPLAYTITLE:whatever}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "DISPLAYTITLE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "whatever",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching",
		"wikitext": "this is not the title\n{{DISPLAYTITLE:screen}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "DISPLAYTITLE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "screen",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Verify that displaytitle works (T24501) AllowDisplayTitle=false",
		"wikitext": "this is not the title\n{{DISPLAYTITLE:screen}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "DISPLAYTITLE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "screen",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE",
		"wikitext": "this is not the title",
		"nodes": []
	},
	{
		"desc": "Verify that displaytitle handles inline CSS styles (T28547) - rejected value",
		"wikitext": "this is not the title\n{{DISPLAYTITLE:<span style=\"display: none;\">s</span>creen}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "DISPLAYTITLE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "span ",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": "style=",
				"name": "mw-ext-ground attributeName"
			},
			{
				"text": "\"display: none;\"",
				"name": "mw-ext-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "s",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "</",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "creen",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Verify that displaytitle handles inline CSS styles (T28547) - accepted value",
		"wikitext": "this is not the title\n{{DISPLAYTITLE:<span style=\"color: red;\">s</span>creen}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "DISPLAYTITLE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "span ",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": "style=",
				"name": "mw-ext-ground attributeName"
			},
			{
				"text": "\"color: red;\"",
				"name": "mw-ext-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "s",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "</",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "creen",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Verify that displaytitle encodes & to &amp; (T291985)",
		"wikitext": "this is not the title\n{{DISPLAYTITLE:art&copy}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "DISPLAYTITLE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "art&copy",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Verify that displaytitle encodes &amp; to &amp; (T291985)",
		"wikitext": "this is not the title\n{{DISPLAYTITLE:art&amp;copy}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "DISPLAYTITLE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "art",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "&amp;",
				"name": "mw-ext-ground mw-html-entity"
			},
			{
				"text": "copy",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Verify that without displaytitle the title encodes & to &amp; (T291985)",
		"wikitext": "this is not the title",
		"nodes": []
	},
	{
		"desc": "preload: check <noinclude> and <includeonly>",
		"wikitext": "Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "preload: check <onlyinclude>",
		"wikitext": "Goodbye <onlyinclude>Hello world</onlyinclude>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "preload: can pass tags through if we want to",
		"wikitext": "<includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "preload: check that it doesn't try to do tricks",
		"wikitext": "* <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<!-- Hello -->",
				"name": "comment"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "world",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "includeonly",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "subst:",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "includeonly",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "How are you",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}{{ ",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{{",
				"name": "mw-template-ground brace"
			},
			{
				"text": "|",
				"name": "mw-template-ground mw-templatevariable-delimiter"
			},
			{
				"text": "safesubst:",
				"name": "mw-template-ground atom"
			},
			{
				"text": "}}}",
				"name": "mw-template-ground brace"
			},
			{
				"text": " #if:1",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "2",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "3",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Play a bit with r67090 and T5158",
		"wikitext": "<div style=\"width:50% !important\">&nbsp;</div>\n<div style=\"width:50%&nbsp;!important\">&nbsp;</div>\n<div style=\"width:50%&#160;!important\">&nbsp;</div>\n<div style=\"border : solid;\">&nbsp;</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"width:50% !important\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"width:50%",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "!important\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"width:50%",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "&#160;",
				"name": "mw-html-entity"
			},
			{
				"text": "!important\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"border : solid;\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "French spaces in wikitext",
		"wikitext": "foo ! bar ? bat 50 % is less than 75 %.\n\nHello : this ; is « something ‹ else › again »",
		"nodes": []
	},
	{
		"desc": "Corner case: french spaces in definition list",
		"wikitext": ";foo : bar",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "foo ",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "T5158: Test for French spaces in attributes",
		"wikitext": "<br style=\" clear : both ; \" />",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\" clear : both ; \"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " ",
				"name": "attributeName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Displayspace processing on embedded fragments",
		"wikitext": "[[File:Foobar.jpg|« test »]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "« test »",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "HTML5 data attributes",
		"wikitext": "<span data-foo=\"bar\">Baz</span>\n<p data-abc-def_hij=\"\">Quuz</p>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "data-foo=",
				"name": "attributeName"
			},
			{
				"text": "\"bar\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "p ",
				"name": "tagName"
			},
			{
				"text": "data-abc-def_hij=",
				"name": "attributeName"
			},
			{
				"text": "\"\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Strip reserved data attributes",
		"wikitext": "<div data-mw=\"foo\" data-parsoid=\"bar\" data-mw-someext=\"baz\" data-ok=\"fred\" data-object-id=\"123\" data-ooui=\"xyzzy\" data-bad:ns=\"ns\">d</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "data-mw=",
				"name": "attributeName"
			},
			{
				"text": "\"foo\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " data-parsoid=",
				"name": "attributeName"
			},
			{
				"text": "\"bar\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " data-mw-someext=",
				"name": "attributeName"
			},
			{
				"text": "\"baz\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " data-ok=",
				"name": "attributeName"
			},
			{
				"text": "\"fred\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " data-object-id=",
				"name": "attributeName"
			},
			{
				"text": "\"123\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " data-ooui=",
				"name": "attributeName"
			},
			{
				"text": "\"xyzzy\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " data-bad:ns=",
				"name": "attributeName"
			},
			{
				"text": "\"ns\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "percent-encoding and + signs in internal links (T28410)",
		"wikitext": "[[User:+%]] [[Page+title%]]\n[[%+]] [[%+|%20]] [[%+ ]] [[%+r]]\n[[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]\n[[%33%45]] [[%33%45+]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "User:+%",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Page+title%",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "%+",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "%+",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "%20",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "%+ ",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "%+r",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "%",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "+",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:%+abc%39",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "%33%45",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "%33%45+",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)",
		"wikitext": "Text&apos;s been normalized?",
		"nodes": [
			{
				"text": "&apos;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links",
		"wikitext": "http://www.example.org/　<-- U+3000 (vim: ^Vu3000)",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "www.example.org/",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links",
		"wikitext": "[http://www.example.org/　ideograms]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.org/",
				"name": "mw-link-ground url"
			},
			{
				"text": "　",
				"name": "mw-link-ground"
			},
			{
				"text": "ideograms",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links",
		"wikitext": "http://www.example.org/pic.png　<-- U+3000 (vim: ^Vu3000)",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "www.example.org/pic.png",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "T33098 Template which includes system messages which includes the template",
		"wikitext": "{{Identical}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Identical",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T33490 ucfırst (with a dotless i) with English language",
		"wikitext": "{{ucfırst:blah}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "ucfırst:blah",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T34057: Title needed when expanding <h> nodes.",
		"wikitext": "{{int:T34057}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "int",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "T34057",
				"name": "mw-ext-ground unit mw-pagename mw-function-8"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Title needed when expanding templates.",
		"wikitext": "{{Template with pagename}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Template with pagename",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Strip marker in urlencode",
		"wikitext": "{{urlencode:x<nowiki/>y}}\n{{urlencode:x<nowiki/>y|wiki}}\n{{urlencode:x<nowiki/>y|path}}\n{{urlencode:x<pre id=\"one\">two</pre>y}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "urlencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "x",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "y",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "urlencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "x",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "y",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "wiki",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "urlencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "x",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "y",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "path",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "urlencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "x",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-pre"
			},
			{
				"text": "id=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-pre"
			},
			{
				"text": "\"one\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "two",
				"name": "mw-ext-ground mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-ext-ground mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "y",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Strip marker in lc",
		"wikitext": "{{lc:x<nowiki/>y}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "lc",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "x",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "y",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Strip marker in uc",
		"wikitext": "{{uc:x<nowiki/>y}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "uc",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "x",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "y",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Strip marker in formatNum",
		"wikitext": "{{formatnum:1<nowiki/>2}}\n{{formatnum:1<nowiki/>2|R}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "formatnum",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "formatnum",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "R",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Check lossless in formatNum",
		"wikitext": "{{formatnum:9999999999999999}}\n{{formatnum:9999999999999999|LOSSLESS}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "formatnum",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "9999999999999999",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "formatnum",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "9999999999999999",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "LOSSLESS",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Check noCommafy + lossless in formatNum",
		"wikitext": "{{formatnum:999999999999999|NOSEP|LOSSLESS}}\n{{formatnum:9999999999999999|NOSEP|LOSSLESS}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "formatnum",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "999999999999999",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "NOSEP",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "LOSSLESS",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "formatnum",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "9999999999999999",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "NOSEP",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "LOSSLESS",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Wrong option for formatNum (T58199)",
		"wikitext": "{{formatnum:1,234.56|Random}}\n{{formatnum:1,234.56|EVERYTHING}}\n{{formatnum:1234.56|any argument that has the string 'NOSEP'}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "formatnum",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1,234.56",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Random",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "formatnum",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1,234.56",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "EVERYTHING",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "formatnum",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1234.56",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "any argument that has the string 'NOSEP'",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Strip marker in padleft",
		"wikitext": "{{padleft:|2|x<nowiki/>y}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "padleft",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "x",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "y",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Strip marker in padright",
		"wikitext": "{{padright:|2|x<nowiki/>y}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "padright",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "x",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "y",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Strip marker in anchorencode",
		"wikitext": "{{anchorencode:x<nowiki/>y}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "anchorencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "x",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "y",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "new support for bdi element (T33817)",
		"wikitext": "<p dir=\"rtl\" lang=\"he\">ולדימיר לנין (ברוסית: <bdi lang=\"ru\">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "p ",
				"name": "tagName"
			},
			{
				"text": "dir=",
				"name": "attributeName"
			},
			{
				"text": "\"rtl\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " lang=",
				"name": "attributeName"
			},
			{
				"text": "\"he\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "bdi ",
				"name": "tagName"
			},
			{
				"text": "lang=",
				"name": "attributeName"
			},
			{
				"text": "\"ru\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "bdi",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Ignore pipe between table row attributes",
		"wikitext": "{|\n|quux\n|- id=foo | style='color: red'\n|bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|- ",
				"name": "typeOperator"
			},
			{
				"text": "id=",
				"name": "definitionOperator"
			},
			{
				"text": "foo",
				"name": "mw-table-definition-value"
			},
			{
				"text": " | style=",
				"name": "definitionOperator"
			},
			{
				"text": "'color: red'",
				"name": "mw-table-definition-value"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Language parser function (autonym)",
		"wikitext": "{{#language:ar}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#language",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ar",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Language parser function (case-insensitive)",
		"wikitext": "{{#language:AR}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#language",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "AR",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Language parser function (non-autonym)",
		"wikitext": "{{#language:aR|En}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#language",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "aR",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "En",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Language parser function (bcp-47 codes)",
		"wikitext": "{{#language:de-x-formal|en-simple}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#language",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "de-x-formal",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "en-simple",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Dir parser function (valid codes)",
		"wikitext": "Persian: {{#dir:fa}}\n\nEnglish: {{#dir:en}}\n\nPersian (with space): {{#dir: fa}}\n\nTajik: {{#dir:tg}}\n\nThe string 'egl' is a valid internal code; however when used as a\nBCP-47 code it refers to the internal code 'eml'.  Unfortunately,\nboth of these have ltr directionality which makes this test case\nless useful than it could be.\n\nAmbiguous BCP-47 code:\n;Directionality of internal code 'egl':{{#dir:egl}}\n;Directionality of internal code 'eml':{{#dir:egl|bcp47}} == {{#dir:eml}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#dir",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "fa",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#dir",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "en",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#dir",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " fa",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#dir",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "tg",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "Directionality of internal code 'egl'",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#dir",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "egl",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "Directionality of internal code 'eml'",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#dir",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "egl",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "bcp47",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#dir",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "eml",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Dir parser function (invalid code)",
		"wikitext": "{{#dir:blah<blah}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#dir",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "blah<blah",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Bcp47 parser function (valid codes)",
		"wikitext": "Serbian: {{#bcp47:sr-ec}}\n\nCantonese: {{#bcp47:zh-yue}}\n\nFormal German (with space): {{#bcp47: de-formal}}\n\nSimple English: {{#bcp47:simple}}\n\nThe string 'egl' is a valid internal code, distinct from the\ninternal code 'eml'; however both map to the BCP-47 code 'egl'.\n\nAmbiguous BCP-47 code:\n;Internal code 'eml':{{#bcp47:eml}} == egl\n;Internal code 'egl':{{#bcp47:egl}} == egl",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#bcp47",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "sr-ec",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#bcp47",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "zh-yue",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#bcp47",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " de-formal",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#bcp47",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "simple",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "Internal code 'eml'",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#bcp47",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "eml",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "Internal code 'egl'",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#bcp47",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "egl",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Bcp47 parser function (examples from Template:BCP47)",
		"wikitext": "Unaffected codes, for example:\n*{{#bcp47:en}} returns: \"en\"\nChanges required by BCP47, using standard codes:\n*{{#bcp47:als}} returns: \"gsw\"\n*{{#bcp47:fiu-vro}} returns: \"vro\"\n*{{#bcp47:simple}} returns: \"en\"\n*{{#bcp47:zh-classical}} returns: \"lzh\"\n*{{#bcp47:roa-rup}} returns: \"rup\"\nChanges required by BCP47, currently using private-use extensions:\n*{{#bcp47:nrm}} returns: \"nrf\"\n*{{#bcp47:roa-tara}} returns: \"it-x-tara\"\nChanges preferable with BCP47 for improved interoperability (not really violations):\n*{{#bcp47:be-x-old}} returns: \"be-tarask\"",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#bcp47",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "en",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#bcp47",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "als",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#bcp47",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "fiu-vro",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#bcp47",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "simple",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#bcp47",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "zh-classical",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#bcp47",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "roa-rup",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#bcp47",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "nrm",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#bcp47",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "roa-tara",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#bcp47",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "be-x-old",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Padleft and padright (default 0-padding)",
		"wikitext": "{{padleft:xyz|5}}\n{{padright:xyz|5}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "padleft",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "xyz",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "5",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "padright",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "xyz",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "5",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Padleft and padright (partial fill)",
		"wikitext": "{{padleft:xyz|6|ab}}\n{{padright:xyz|6|ab}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "padleft",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "xyz",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "6",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ab",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "padright",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "xyz",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "6",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ab",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Padleft and padright as substr",
		"wikitext": "{{padleft:|3|abcde}}\n{{padright:|3|abcde}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "padleft",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "abcde",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "padright",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "abcde",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Padleft and padright with non-numerical length (T180403)",
		"wikitext": "{{padleft:abcdef|junk}}\n{{padright:abcdef|junk}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "padleft",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "abcdef",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "junk",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "padright",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "abcdef",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "junk",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Special parser function",
		"wikitext": "{{#special:RandomPage}}\n{{#special:BaDtItLe}}\n{{#special:Foobar}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#special",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "RandomPage",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#special",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "BaDtItLe",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#special",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Foobar",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Using {{=}} when it expands to \"=\" should not create a tracking category",
		"wikitext": "This uses {{=}} and {{Template:=}}.",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "=",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Template:=",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Using {{=}} when it expands to \"=\" should not create a tracking category (cat)",
		"wikitext": "This uses {{=}} and {{Template:=}}.",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "=",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Template:=",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T36939 - Case insensitive link parsing ([HttP://])",
		"wikitext": "[HttP://MediaWiki.Org/]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "HttP://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "MediaWiki.Org/",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "T36939 - Case insensitive link parsing ([HttP:// title])",
		"wikitext": "[HttP://MediaWiki.Org/ MediaWiki]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "HttP://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "MediaWiki.Org/",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "MediaWiki",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "T36939 - Case insensitive link parsing (HttP://)",
		"wikitext": "HttP://MediaWiki.Org/",
		"nodes": [
			{
				"text": "HttP://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "MediaWiki.Org/",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "1. SOL-sensitive wikitext tokens as template-args",
		"wikitext": "{{1x|*a}}\n{{1x|#a}}\n{{1x|:a}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "*a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "#a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": ":a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Wikilink with only closing tag in target",
		"wikitext": "[[Test|</span>]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Test",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "</span>",
				"name": "mw-error"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "LST Sections: Newfangled approach",
		"wikitext": "<section begin=\"2011-05-16\" />\n<section end=\"2014-04-10 (MW 1.23wmf22)\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-section"
			},
			{
				"text": "section ",
				"name": "mw-exttag-name mw-ext-section"
			},
			{
				"text": "begin=",
				"name": "mw-exttag-attribute mw-ext-section"
			},
			{
				"text": "\"2011-05-16\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-section"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-section"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-section"
			},
			{
				"text": "section ",
				"name": "mw-exttag-name mw-ext-section"
			},
			{
				"text": "end=",
				"name": "mw-exttag-attribute mw-ext-section"
			},
			{
				"text": "\"2014-04-10 (MW 1.23wmf22)\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-section"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-section"
			}
		]
	},
	{
		"desc": "LST Sections: Fostering",
		"wikitext": "{|\n<section name=\"testing\"/>\n| 123\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-section"
			},
			{
				"text": "section ",
				"name": "mw-exttag-name mw-ext-section"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-section"
			},
			{
				"text": "\"testing\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-section"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Empty LI and TR nodes should be stripped from template content",
		"wikitext": "{{EmptyLITest}}\n{{EmptyTRTest}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "EmptyLITest",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "EmptyTRTest",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Empty LI and TR nodes should not be stripped from top-level content",
		"wikitext": "* a\n*\n* b\n\n{|\n|-\n|-\n|foo\n|}",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Empty TR nodes should not be stripped if they have any attributes set",
		"wikitext": "{{EmptyTRWithHTMLAttrTest}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "EmptyTRWithHTMLAttrTest",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "\nTag-like HTML structures are passed through as text",
		"wikitext": "<x y>\n\n<x.y>\n\n<x-y>\n\n1>2\n\nx<y\n\na>b\n\n1<d e>f",
		"nodes": []
	},
	{
		"desc": "HTML tag with necessary entities in attributes",
		"wikitext": "<span title=\"&amp;amp;\">foo</span>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "amp;\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "HTML tag with 'unnecessary' entity encoding in attributes",
		"wikitext": "<span title=\"&amp;\">foo</span>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "HTML tag with broken attribute value quoting",
		"wikitext": "<span title=\"Hello world>Foo</span>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"Hello world",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Self-closed tag with broken attribute value quoting",
		"wikitext": "<div title=\"Hello world />Foo",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"Hello world ",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Table with broken attribute value quoting",
		"wikitext": "{|\n| title=\"Hello world|Foo\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Table with broken attribute value quoting on consecutive lines",
		"wikitext": "{|\n| title=\"Hello world|Foo\n| style=\"color:red|Bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Accept empty td cell attribute",
		"wikitext": "{|\n| align=\"center\" |foo||  |\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Non-empty attributes in th-cells",
		"wikitext": "{|\n!Foo!! style=\"color: red\" |Bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "Foo",
				"name": "mw-strong"
			},
			{
				"text": "!!",
				"name": "typeOperator"
			},
			{
				"text": " style=\"color: red\" ",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "Bar",
				"name": "mw-strong"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Accept empty attributes in th-cells",
		"wikitext": "{|\n!|foo!!|bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!|",
				"name": "typeOperator"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": "!!|",
				"name": "typeOperator"
			},
			{
				"text": "bar",
				"name": "mw-strong"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Empty table rows go away",
		"wikitext": "{|\n|Hello\n|there\n|- class=\"foo\"\n|-\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|- ",
				"name": "typeOperator"
			},
			{
				"text": "class=",
				"name": "definitionOperator"
			},
			{
				"text": "\"foo\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "RT-ed inter-element separators should be valid separators",
		"wikitext": "{|\n|- [[foo]]\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|- ",
				"name": "typeOperator"
			},
			{
				"text": "[[foo]]",
				"name": "definitionOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out",
		"wikitext": "{|\n|<small>foo\nbar\n|}\n\n{|\n|<small>foo<small>\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Empty TD followed by TD with tpl-generated attribute",
		"wikitext": "{|\n|-\n|\n|{{1x|style='color:red'}}|foo\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "style=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "'color:red'",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Indented table with an empty td",
		"wikitext": " {|\n |-\n |\n |foo\n |}",
		"nodes": [
			{
				"text": " {|",
				"name": "null"
			},
			{
				"text": " |-",
				"name": "typeOperator"
			},
			{
				"text": " |",
				"name": "typeOperator"
			},
			{
				"text": " |",
				"name": "typeOperator"
			},
			{
				"text": " |}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Indented table with blank lines in between (T85627)",
		"wikitext": " {|\n |foo\n \n \n |}",
		"nodes": [
			{
				"text": " {|",
				"name": "null"
			},
			{
				"text": " |",
				"name": "typeOperator"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " |}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Indented block & table",
		"wikitext": " <div>foo</div>\n {|\n |foo\n |}",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " {|",
				"name": "null"
			},
			{
				"text": " |",
				"name": "typeOperator"
			},
			{
				"text": " |}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Indent and comment before table row",
		"wikitext": "{|\n <!--hi-->|-\n |there\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": " <!--hi-->",
				"name": "comment"
			},
			{
				"text": " |",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Empty TR followed by a template-generated TR",
		"wikitext": "{|\n|-\n{{1x|<tr><td>foo</td></tr>}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Empty TR followed by mixed-ws-comment line should RT correctly",
		"wikitext": "{|\n|-\n <!--c-->\n|-\n<!--c--> <!--d-->\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": " <!--c-->",
				"name": "comment"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "<!--c-->",
				"name": "comment"
			},
			{
				"text": "<!--d-->",
				"name": "comment"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Multi-line image caption generated by templates with/without trailing newlines",
		"wikitext": "[[File:Foobar.jpg|thumb|300x300px|foo\\n{{1x|A}}\\n{{1x|B}}\\n{{1x|C}}]]\n[[File:Foobar.jpg|thumb|300x300px|foo\\n{{1x|A}}\\n{{1x|B}}\\n{{1x|C}}\\n\\n]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "300x300px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "foo\\n",
				"name": "mw-link-ground string"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "A",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "\\n",
				"name": "mw-link-ground string"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "B",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "\\n",
				"name": "mw-link-ground string"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "C",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "300x300px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "foo\\n",
				"name": "mw-link-ground string"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "A",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "\\n",
				"name": "mw-link-ground string"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "B",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "\\n",
				"name": "mw-link-ground string"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "C",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "\\n\\n",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly",
		"wikitext": "<includeonly>foo</includeonly>\nnew para\n\n[[Category:Foo]]\n\n= new heading =",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": " new heading ",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Improperly nested inline or quotes tags with whitespace in between",
		"wikitext": "<span> <s>x</s></span><s> </s>\n''' ''x'''''",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": " ",
				"name": "mw-strong"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "x",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Encapsulate protected attributes from wt",
		"wikitext": "<div typeof=\"mw:placeholder stuff\" data-mw=\"whoo\" data-parsoid=\"weird\" data-parsoid-other=\"no\" about=\"time\" rel=\"mw:true\">foo</div>\n\n{| typeof=\"mw:placeholder stuff\" data-mw=\"whoo\" data-parsoid=\"weird\" data-parsoid-other=\"no\" about=\"time\" rel=\"mw:true\"\n|ok\n|}",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "typeof=",
				"name": "attributeName"
			},
			{
				"text": "\"mw:placeholder stuff\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " data-mw=",
				"name": "attributeName"
			},
			{
				"text": "\"whoo\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " data-parsoid=",
				"name": "attributeName"
			},
			{
				"text": "\"weird\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " data-parsoid-other=",
				"name": "attributeName"
			},
			{
				"text": "\"no\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " about=",
				"name": "attributeName"
			},
			{
				"text": "\"time\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " rel=",
				"name": "attributeName"
			},
			{
				"text": "\"mw:true\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "typeof=",
				"name": "definitionOperator"
			},
			{
				"text": "\"mw:placeholder stuff\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": " data-mw=",
				"name": "definitionOperator"
			},
			{
				"text": "\"whoo\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": " data-parsoid=",
				"name": "definitionOperator"
			},
			{
				"text": "\"weird\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": " data-parsoid-other=",
				"name": "definitionOperator"
			},
			{
				"text": "\"no\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": " about=",
				"name": "definitionOperator"
			},
			{
				"text": "\"time\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": " rel=",
				"name": "definitionOperator"
			},
			{
				"text": "\"mw:true\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Ensure ParagraphWrapper can deal with stray closing pre tags",
		"wikitext": "plain text</pre>",
		"nodes": [
			{
				"text": "</pre",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "1. Ensure fostered text content is wrapped in element nodes",
		"wikitext": "<table>hi</table><table>ho</table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)",
		"wikitext": "<table>\n<tr> || ||\n<td> a\n</table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</table>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "Encapsulation properly handles null DSR information from foster box",
		"wikitext": "{{1x|<table>foo<tr><td>bar</td></tr></table>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "1. Encapsulate foster-parented transclusion content",
		"wikitext": "<table>{{1x|foo<tr><td>bar</td></tr>}}</table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "2. Encapsulate foster-parented transclusion content",
		"wikitext": "<table><div>{{1x|foo}}</div><tr><td>bar</td></tr></table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "3. Encapsulate foster-parented transclusion content",
		"wikitext": "<table><div><p>{{1x|foo</p></div><tr><td>}}bar</td></tr></table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "p",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "4. Encapsulate foster-parented transclusion content",
		"wikitext": "<table><div><p>{{1x|foo</p></div><tr><td>}}bar</td></tr></table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "p",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "5. Encapsulate foster-parented transclusion content",
		"wikitext": "<table><tr><td><div><p>{{1x|foo</p></div></td>foo}}</tr></table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "p",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "6. Encapsulate foster-parented transclusion content",
		"wikitext": "<table><tr><td><div><p>{{1x|foo</p></div></td>foo</tr></table>}}<p>ok</p>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "p",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "7. Encapsulate foster-parented transclusion content",
		"wikitext": "<table>{{1x|<p>foo</p>}}<td>bar</td></table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "p",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "p",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "8. Encapsulate foster-parented transclusion content",
		"wikitext": "{{1x|a\n}}{|{{1x|style='color:red'}}\n|-\n|b\n|}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "style=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "'color:red'",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "9. Encapsulate foster-parented transclusion content",
		"wikitext": "<table>{{1x|hi</table>hello}}",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "hi",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "hello",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Table in fosterable position",
		"wikitext": "{{OpenTable}}\n<div>\n{|\n|}\n</div>\n|}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "OpenTable",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Properly encapsulate empty-content transclusions in fosterable positions",
		"wikitext": "<table>\n{{#if:|\n<td>foo</td>\n}}\n</table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "</",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Always encapsulate foster box when template range is expanded to table",
		"wikitext": "{|\nhello\n{{OpenTable}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "OpenTable",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "T115289: Unclosed table",
		"wikitext": "{{1x|<table>}}<!--c-->[[Category:Two]]",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<!--c-->",
				"name": "comment"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Two",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T115289: Don't migrate newlines out of tables with fostered content",
		"wikitext": "<table><td></td>{{1x|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Category:One",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<!--c-->",
				"name": "comment"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Two",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T73074: More fostering fun",
		"wikitext": "<table><td></td>{{1x|<tr>}}<!--c-->[[Category:Two]]",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<!--c-->",
				"name": "comment"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Two",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Fostered content with a dom fragment token starting with a transclusion",
		"wikitext": "{|\n[[File:Foobar.jpg|right|{{1x|<div>123</div>}}]]\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-link-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-link-ground angleBracket"
			},
			{
				"text": "123",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-link-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-link-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "1. Template wrapping shouldn't ignore fostered content",
		"wikitext": "{|\n{{tr}}\n{{1x|\n}}\n\nhiho",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "2. Template wrapping shouldn't ignore fostered content",
		"wikitext": "{|\n{{tr}}\n{{1x|\n }}\n\nhiho",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "tr",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": " ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Support <object> element with .data attribute",
		"wikitext": "<object data=\"test.swf\"></object>",
		"nodes": []
	},
	{
		"desc": "T72867: Don't block XML namespace declaration",
		"wikitext": "<span xmlns:dct=\"http://purl.org/dc/terms/\" property=\"dct:title\">MediaWiki</span>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "xmlns:dct=",
				"name": "attributeName"
			},
			{
				"text": "\"http://purl.org/dc/terms/\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " property=",
				"name": "attributeName"
			},
			{
				"text": "\"dct:title\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Ignore rel attribute in a-tags during serialization to url-links",
		"wikitext": "http://en.wikipedia.org/wiki/Foobar\nhttp://en.wikipedia.org/wiki/Foobar\nhttp://en.wikipedia.org/wiki/Foobar",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "en.wikipedia.org/wiki/Foobar",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "en.wikipedia.org/wiki/Foobar",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "en.wikipedia.org/wiki/Foobar",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)",
		"wikitext": "[[Foo]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid should accept interwiki shortcuts",
		"wikitext": "[[:fr:Foo|Foo]]\n[[:fr:Foo|Foo]]\n[[:fr:Foo|Foo]]\n\n[[:fr:Foo|Foo]]\n[[:fr:Foo|Foo]]\n[[:fr:Foo|Foo]]\n\n[[:fr:Foo|Foo]]\n[[:fr:Foo|Foo]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":fr:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":fr:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":fr:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":fr:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":fr:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":fr:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":fr:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":fr:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid should not accept invalid interwiki shortcuts",
		"wikitext": "[news:Foo Foo]\n[news:Foo Foo]\n[news:Foo Foo]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "news:",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "news:",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "news:",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "New wikilinks should be serialized properly",
		"wikitext": "[[Foo]]\n[[Foo]]\n[[:en:Foo|//en.wikipedia.org/wiki/Foo]]\nhttp://en.wikipedia.org/wiki/Foo\n[[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":en:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "//en.wikipedia.org/wiki/Foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "en.wikipedia.org/wiki/Foo",
				"name": "mw-free-extlink"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":en:Foo_bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "//en.wikipedia.org/wiki/Foo bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "New wiki links (href variations)",
		"wikitext": "[[Foo_bar]]\n[[Foo_bar]]\n[[Foo_bar]]\n[[Toxine bactérienne]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo_bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo_bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo_bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Toxine bactérienne",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "New wiki links (content string variations)",
		"wikitext": "[[Foo_bar]]\n[[Foo bar]]\n[[Foo_bar|./Foo_bar]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo_bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo_bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "./Foo_bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "New category links (href variations)",
		"wikitext": "[[Category:Toxine bactérienne]]\n[[Category:Toxine bactérienne]]\n[[Category:Toxine bactérienne]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Toxine bactérienne",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Toxine bactérienne",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Toxine bactérienne",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "New interlanguage links (href variations)",
		"wikitext": "[[es:Toxine bactérienne]]\n[[es:Toxine_bactérienne]]\n[[es:Toxine_bactérienne]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Toxine bactérienne",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Toxine_bactérienne",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Toxine_bactérienne",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Emit simple non-piped link where possible",
		"wikitext": "[[VisualEditor]]\n[[visualEditor]]\n[[VisualEditor link]]\n[[visualEditor link]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "VisualEditor",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "visualEditor",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "VisualEditor link",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "visualEditor link",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)",
		"wikitext": "* foo",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Lists: Serialize correctly even when list tags has unneeded whitespace between tags",
		"wikitext": "* foo",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Don't strip leading whitespace when handling indent-pre suppressing tags",
		"wikitext": "{|\n  | indented row\n|}\n<blockquote>\n '''This is very bold of you!'''\n\n{|\n|\n indented cell (no pre-wrapping!)\n|}\n</blockquote>\nfoo\n <div>bar</div>",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "  | ",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "This is very bold of you!",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Strip leading whitespace when handling indent-pre inducing tags",
		"wikitext": "foo\n \n<span>bar</span>\n\n<span>foo2\n</span>bar2\n\n<div>foo</div>\n<span>bar</span>\n\n<div>\n<span>foo</span>\n</div>",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Lists: Dont insert newlines in a serialized list item.",
		"wikitext": "* a<br />b\n* c",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Headings: Force sol-transparent links and behavior switches to serialize before/after",
		"wikitext": "== hello there ==\n[[Category:A1]]\n[[Category:A2]]\n\n== hi pal ==\n\n<!--foo-->  [[Category:A3]]\n\n== how goes it ==\n\n== it goes well ==\n[[Category:A4]]  <!--bar-->\n\n__TOC__\n\n== ok ==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " hello there ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:A1",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:A2",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " hi pal ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "<!--foo-->",
				"name": "comment"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:A3",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " how goes it ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " it goes well ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:A4",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<!--bar-->",
				"name": "comment"
			},
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " ok ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Headings: Don't hoist metas that come from templates",
		"wikitext": "== {{1x|foo [[Category:Foo]]}} ==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " ",
				"name": "mw-section"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": " ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Parsoid: Serialize positional parameters with = in them as named parameter",
		"wikitext": "{{1x|1=f=oo}}\n\n{{1x|1=f=oo|2=bar}}\n\n<!--Orig params with data-parsoid has heuristics for handling = chars-->\n<!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->\n{{1x|<nowiki>f=oo</nowiki>|bar}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "f=oo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "f=oo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "2=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<!--Orig params with data-parsoid has heuristics for handling = chars-->",
				"name": "comment"
			},
			{
				"text": "<!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->",
				"name": "comment"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "f=oo",
				"name": "mw-template-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Parsoid: Serialize positional parameters with = in extlink as named parameter",
		"wikitext": "{{1x|1=http://stuff?is=ok}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "http://stuff?is=ok",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes",
		"wikitext": "<div>a\nb\n</div>\n<div>a\nb\n</div>\n<div>\na\n\nb\n</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Substrings resembling wikitext in hrefs should not get nowiki escapes",
		"wikitext": "[[Foo''bar''baz]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo''bar''baz",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Ignore single-line context for wikilinks",
		"wikitext": "* [[Foo|\nbar]]\n\n== [[Foo|\nbar]] ==\n\n* [[Foo|bar\n<span style=\"background-color:green;\ncolor:blue\">x</span>]]",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span ",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "style=",
				"name": "mw-link-ground attributeName"
			},
			{
				"text": "\"background-color:green;",
				"name": "mw-link-ground mw-htmltag-attribute-value"
			},
			{
				"text": "color:blue\"",
				"name": "mw-link-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "x",
				"name": "mw-link-ground string"
			},
			{
				"text": "</",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Selser: Ignore single-line context for wikilinks",
		"wikitext": "* [[Foo|\nbar]]",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "1. I/B quote minimization: wikitext-only tags should be combined",
		"wikitext": "''AB''\n\n'''AB'''\n\n''A'''B'''''\n\n'''A''B'''''\n\n'''A''BC''D'''\n\n'''''AB'''''\n\n'''''AB'''''\n\n'''''AB'''''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "AB",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "AB",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "A",
				"name": "mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "B",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "A",
				"name": "mw-strong"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "B",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "A",
				"name": "mw-strong"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "BC",
				"name": "mw-strong mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "D",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "AB",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "AB",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "AB",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			}
		]
	},
	{
		"desc": "2. I/B quote minimization: wikitext and html tags should not be combined",
		"wikitext": "''A''<i>B</i>\n\n''A''<nowiki/>'''<i>B</i>'''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "A",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "A",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "B",
				"name": "mw-strong"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "3. I/B quote minimization: templated content stops minimization",
		"wikitext": "''A''{{1x|''B''}}\n\n''A''{{1x|'''''B'''''}}",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "A",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "''B''",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "A",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "'''''B'''''",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "4. I/B quote minimization: new content should be mimimized with adjacent old content",
		"wikitext": "''AB''\n\n'''AB'''\n\n''A'''B'''''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "AB",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "AB",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "A",
				"name": "mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "B",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			}
		]
	},
	{
		"desc": "5a. Merge adjacent quote nodes if they've been edited",
		"wikitext": "''a''b''c''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "a",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "c",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "5b. Merge adjacent quote nodes if they've been edited",
		"wikitext": "''a''<span id=\"x\">b</span>''c''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "a",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"x\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "c",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "1. Merge adjacent link nodes as long as at least one element is new",
		"wikitext": "[[Football]]\n[[Football]]\n[[Football|Foot]][[Football|ball]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Football",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Football",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Football",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Foot",
				"name": "mw-link-ground string"
			},
			{
				"text": "]][[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Football",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "ball",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "2. Merge adjacent link nodes and enable additional normalizations",
		"wikitext": "''[[Football]]''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Football",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-em"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "1. Move format tags outside of WikiLink",
		"wikitext": "''[[Football]]''\n'''''[[Football]]'''''\n<u>'''''[[Football]]'''''</u>",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Football",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-em"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Football",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-strong mw-em"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "u",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Football",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-strong mw-em"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "u",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "2. Move format tags outside of WikiLink with mergable A tags",
		"wikitext": "'''''[[Football]]'''''",
		"nodes": [
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Football",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-strong mw-em"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "'''''",
				"name": "character"
			}
		]
	},
	{
		"desc": "3. Move format tags outside of WikiLink while preserving formats already outside WikiLink",
		"wikitext": "<font color=\"red\"><u>'''[[Foo]]'''</u></font>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "font ",
				"name": "tagName"
			},
			{
				"text": "color=",
				"name": "attributeName"
			},
			{
				"text": "\"red\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "u",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-strong"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "u",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "font",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "4. Do not move format tags outside of WikiLink which includes attributes color, style and class",
		"wikitext": "[[Foo|<font color=\"red\">Foo</font>]]\n[[Foo|<span style=\"color: blue; font-size: 46px;\">Foo></span>]]\n[[Foo|<span class=\"Bar\">Foo</span>]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "font ",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "color=",
				"name": "mw-link-ground attributeName"
			},
			{
				"text": "\"red\"",
				"name": "mw-link-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "</",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "font",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span ",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "style=",
				"name": "mw-link-ground attributeName"
			},
			{
				"text": "\"color: blue; font-size: 46px;\"",
				"name": "mw-link-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "Foo>",
				"name": "mw-link-ground string"
			},
			{
				"text": "</",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span ",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "class=",
				"name": "mw-link-ground attributeName"
			},
			{
				"text": "\"Bar\"",
				"name": "mw-link-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "</",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "5. T194083 Regression test: Manual edit test to move format tags outside wikilinks",
		"wikitext": "[[Foo]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "6. Regression test: Manual edit test to ensure diff markers are not lost",
		"wikitext": "''Foo''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "Foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "7. T194083 Regression test: Manual edit test to ensure nested diff markers aren't inserted",
		"wikitext": "<div>placeholder</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T192913 Regression test: 1. html2wt of links should not trip on parser functions found in target",
		"wikitext": "[[Category:Bugs-{{#if:blah|Regression|None}}]]\n[[Category:Bugs-{{#if:blah|Regression|None}}|{{#if:blah|2020|None}}-#fragment]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Bugs-",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "{{",
				"name": "mw-ext-link-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-link-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "blah",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "Regression",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "None",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-link-ground paren"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Bugs-",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "{{",
				"name": "mw-ext-link-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-link-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "blah",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "Regression",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "None",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-link-ground paren"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{{",
				"name": "mw-ext-link-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-link-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "blah",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "2020",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "None",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-link-ground paren"
			},
			{
				"text": "-#fragment",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T192913 Regression test: 2. html2wt of links should not trip on parser functions found in target (2)",
		"wikitext": "[[Category:Bugs-{{#if:blah|Regression|None}}|fragment]]\n[[Category:Bugs-{{#if:blah|Regression|None}}-{{#if:blah|2020|None}}|fragment]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Bugs-",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "{{",
				"name": "mw-ext-link-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-link-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "blah",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "Regression",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "None",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-link-ground paren"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "fragment",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Bugs-",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "{{",
				"name": "mw-ext-link-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-link-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "blah",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "Regression",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "None",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-link-ground paren"
			},
			{
				"text": "-",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "{{",
				"name": "mw-ext-link-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-link-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "blah",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "2020",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "None",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-link-ground paren"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "fragment",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T56262: New entities",
		"wikitext": "&nbsp;",
		"nodes": [
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "Consecutive <pre>s should not get merged",
		"wikitext": " a\n\n b\n\n c\n\n d\n\n e\n \n\n \n f",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "WTS of autolinks with trailing/surrounding context",
		"wikitext": "http://cscott.net'''foo'''\n\nhttp://cscott.net<b>foo</b>\n\n'''http://cscott.net'''\n\n'''http://cscott.net '''\n\n'''http://cscott.net<nowiki/>x'''\n\nhttp://cscott.net<nowiki/>x",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "cscott.net",
				"name": "mw-free-extlink"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "cscott.net",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "http://cscott.net",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "http://cscott.net ",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "http://cscott.net",
				"name": "mw-strong"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "x",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "cscott.net",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "WTS of autolinks with nowikis (round-trip)",
		"wikitext": "x<nowiki/>http://cscott.net<nowiki/>x",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "WTS of autolinks with escapes (editing)",
		"wikitext": "x<nowiki/>http://cscott.net<nowiki/>x",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "WTS of edited autolink-like text (T103364)",
		"wikitext": "Not a link: <nowiki>http://example.com</nowiki>.",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "http://example.com",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "WTS of newly-authored autolink-like text (T103364)",
		"wikitext": "<nowiki>http://example.com</nowiki> is not a link.",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "http://example.com",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "WTS of autolink-like text after an autolink (T108563)",
		"wikitext": "http://example.com <nowiki>http://example.com</nowiki> is not a link.",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "http://example.com",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "WTS of an autolink surrounded by square brackets (T220018)",
		"wikitext": "<nowiki>[</nowiki>http://example.com]",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "WTS of edited autolink surrounded by square brackets (T220018)",
		"wikitext": "http://example.com",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "WTS of an external link surrounded by square brackets (T220018)",
		"wikitext": "<nowiki>[</nowiki>[http://example.com foo]]",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "foo",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "WTS of edited external link surrounded by square brackets (T220018)",
		"wikitext": "[http://example.com foo]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "foo",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Edited Redirect link should emit a non-piped wikitext link",
		"wikitext": "#REDIRECT [[Bar]]",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T75121: Infer extension name from typeOf if data-mw is not present",
		"wikitext": "<foo />",
		"nodes": []
	},
	{
		"desc": "T88318: p-wrapped dash in table.",
		"wikitext": "{|\n!-\n!- \n|-\n|<nowiki>-</nowiki>\n|<nowiki>- </nowiki>\n|-\n|<small>-</small>\n|<br />\n-\n|<br />-\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "-",
				"name": "mw-strong"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "- ",
				"name": "mw-strong"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "-",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "- ",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "T149209: WTS: Handle newlines in table cells properly",
		"wikitext": "{|\n|a\nb\n|c\n|-\n|x\n{{!}}y\n|}\n{|\n!a\nb\n!c\n|-\n!x\n!y\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "a",
				"name": "mw-strong"
			},
			{
				"text": "b",
				"name": "mw-strong"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "c",
				"name": "mw-strong"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "x",
				"name": "mw-strong"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "y",
				"name": "mw-strong"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "T149209: Selser: Handle newlines in table cells properly",
		"wikitext": "{|\n! id=\"h1\" |edit-me!!1\n|-\n! id=\"h2\" |edit-me||2\n|-\n| id=\"c1\" |edit-me||3\n|-\n| id=\"c2\" |edit-me||4\n|-\n| id=\"c3\" |edit-me||p||q||r\n|-\n| id=\"c4\" |edit-me||p||q||r\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "! ",
				"name": "typeOperator"
			},
			{
				"text": "id=\"h1\" ",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "edit-me!!1",
				"name": "mw-strong"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "! ",
				"name": "typeOperator"
			},
			{
				"text": "id=\"h2\" ",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "edit-me",
				"name": "mw-strong"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "2",
				"name": "mw-strong"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "HTML id attribute with Parsoid-like element ids should not be serialized to wikitext",
		"wikitext": "{|\n|foo\n| id=\"serialize-this\" |bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Parsoid-like element ids should not be serialized to wikitext unless shadowed",
		"wikitext": "<div id=\"hello\">ok</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"hello\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Testing serialization after deletion of table cells",
		"wikitext": "{|\n!h1 !!h2 !!h3\n| id=\"x\" |c1 {{!}}{{!}}{{!}}c2 |||c3\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "h1 ",
				"name": "mw-strong"
			},
			{
				"text": "!!",
				"name": "typeOperator"
			},
			{
				"text": "h2 ",
				"name": "mw-strong"
			},
			{
				"text": "!!",
				"name": "typeOperator"
			},
			{
				"text": "h3",
				"name": "mw-strong"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "|||",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Testing selser after addition of new row before first row (T125419)",
		"wikitext": "{|\n|a\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Serialize new table rows in a HTML table using HTML tags",
		"wikitext": "<table><tr><td>a</td></tr></table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Serialize new table cells in a HTML row using HTML tags",
		"wikitext": "<table><tr><td>a</td></tr></table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Serialize wikitext list items as HTML list items when embedded in a HTML list",
		"wikitext": "<ul>\n<li>a</li>\n<li>b</li>\n</ul>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Wikitext lists can be nested inside HTML lists",
		"wikitext": "<ul>\n<li>a\n* b\n</li>\n</ul>\n\n<ul>\n<li>x\n* y\n</li>\n</ul>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "WTS change modes",
		"wikitext": "<span id=\"xyz\">hello</span>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"xyz\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Never serialize a-tag as html, regardless of what data-parsoid has to say",
		"wikitext": "[[Foo]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Never serialize a-tag as html, no matter what attributes it has",
		"wikitext": "[http://boo.org http://boohoo.org]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "boo.org",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "http://boohoo.org",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Strip span tags added to mark misnested links",
		"wikitext": "[http://test.com][[one]] two three",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "test.com",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "one",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Catch regression when unpacking misnested links",
		"wikitext": "{{1x|hi}}[http://example.com [[ho]]]",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "hi",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "[[ho",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Use data-parsoid.firstWikitextNode to compute newline constraints for template content",
		"wikitext": "{{1x|a}}\n{|{{1x|c\n{{!}}d\n}}\n|}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "c",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "d",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content",
		"wikitext": "<div id=\"x\">foo</div>\n{|\n{{1x|<div>boo</div>\n{{!}}b}}\n|c\n|}",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"x\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "boo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Serialize multi-line indent-pre starting with wikitext syntax",
		"wikitext": " * 1\n ** 2\n * 3",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "1. Categories should always be serialized on their own line",
		"wikitext": "foo\n[[Category:Foo]]\nbar",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "2. Categories that are part of templates should not introduce a line break",
		"wikitext": "foo {{1x|<span>bar</span> [[Category:baz]]}} bar",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": " ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Category:baz",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "RTL (\\u200f) and LTR (\\u200e) markers around category tags should be stripped",
		"wikitext": "[[קטגוריה:טקסים]]\n[[קטגוריה: שיטות משפט]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "קטגוריה:טקסים",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "קטגוריה: שיטות משפט",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "RTL (\\u200f) and LTR (\\u200e) markers should not be stripped if followed by a text node",
		"wikitext": "[[קטגוריה:טקסים]]\n‏y",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "קטגוריה:טקסים",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Lists: Add space after bullets",
		"wikitext": "* foo\n* bar\n* <span> baz</span>",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "1. Headings: Add space before/after == (T53744)",
		"wikitext": "== foo ==\n\n== bar ==\n\n== baz ==\n\n== <span> baz</span> ==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " foo ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " bar ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " baz ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " ",
				"name": "mw-section"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " baz",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "2. Headings: Add space before/after == even after hoisted content",
		"wikitext": "[[Category:A2]]\n\n== ok ==",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:A2",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " ok ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "2. Headings: suppress empty headings on edits",
		"wikitext": "==<span id=\"x\">foo</span>==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"x\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Headings: Replace <br/> with a single whitespace char",
		"wikitext": "== foo bar ==\n\n== foo <span> bar</span> baz ==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " foo bar ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " foo ",
				"name": "mw-section"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " bar",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " baz ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "2. WT Quote Tags: suppress empty style tags on edits",
		"wikitext": "'''<span id=\"x\">foo</span>'''",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"x\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "2. Anchors: suppress empty anchors on edits",
		"wikitext": "[[Test|<span id=\"x\">foo</span>]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Test",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span ",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "id=",
				"name": "mw-link-ground attributeName"
			},
			{
				"text": "\"x\"",
				"name": "mw-link-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "</",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "3a. Anchors: do not suppress numbered extlinks",
		"wikitext": "[http://foo.com]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "foo.com",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "3b. Anchors: do not suppress numbered extlinks",
		"wikitext": "[http://foo.com <span id=\"x\">foo</span>]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "foo.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "<",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span ",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "id=",
				"name": "mw-link-ground attributeName"
			},
			{
				"text": "\"x\"",
				"name": "mw-link-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "</",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Normalizations should be restricted to edited content",
		"wikitext": "a\n= =\nb",
		"nodes": [
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": " ",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			}
		]
	},
	{
		"desc": "1. Multiple normalizations (html2wt)",
		"wikitext": "[[foo]]\nx",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "2. Multiple normalizations (selser)",
		"wikitext": "<div id=\"x\">foo</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"x\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph",
		"wikitext": "hi\n\nhello",
		"nodes": []
	},
	{
		"desc": "2. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell",
		"wikitext": "Foo\nbar\nbaz\n\n{|\n|Foo\nbar\nbaz bang\n|}\n\n<!--boo-->foo\nbar\n\nfoo\nbar<span>boo</span>",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "<!--boo-->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "3. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs",
		"wikitext": "xyz",
		"nodes": []
	},
	{
		"desc": "New links that end in spaces",
		"wikitext": "[[Berlin]] is the capital of Germany.\n\n[[Foo]] '''bar'''\n\n[[Boston]] is a city.",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Berlin",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bar",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Boston",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "1. Table cells with escapable prefixes",
		"wikitext": "{|\n|a\n|-\n| -\n|-\n| +\n|-\n| }\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "2a. Table cells with escapable prefixes after edits",
		"wikitext": "{|\n|a||-\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "2b. Table cells with escapable prefixes after edits",
		"wikitext": "{|\n|pqr\n|<span id=\"x\">foo</span>+\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"x\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "3a. Table cells without escapable prefixes after edits",
		"wikitext": "{|\n| id=\"x\" |abcd\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "3b. Table cells without escapable prefixes after edits",
		"wikitext": "{|\n|a||b\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "3c. Table cells without escapable prefixes after edits",
		"wikitext": "{|\n|-\n<!--foo--> |a||-\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "<!--foo-->",
				"name": "comment"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "3d. Table cells without escapable prefixes after edits",
		"wikitext": "<table>\n<tr><td>a</td></tr>\n</table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "4. font tags without attributes should be dropped",
		"wikitext": "foo\nbar\n<font class=\"x\">boo</font>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "font ",
				"name": "tagName"
			},
			{
				"text": "class=",
				"name": "attributeName"
			},
			{
				"text": "\"x\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "font",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Normalize empty paragraphs to HTML form that html2wt expects",
		"wikitext": "<div>1</div>\na\n\n\nb\n<div>2</div>\na\n\n\nb\n<div>3</div>\na\n\n\n\n\n\nb\n<div>4</div>\na\n\n<div>foo</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templated content should be skipped over by normalization",
		"wikitext": "{{SomeTemplate1|boo}}{{SomeTemplate2|booboo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "SomeTemplate1",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "boo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "SomeTemplate2",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "booboo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Escape DOM elements",
		"wikitext": "&lt;nowiki&gt;''foo''&lt;/nowiki&gt;\n&lt;noinclude&gt;''foo''&lt;/noinclude&gt;\n&lt;includeonly&gt;''foo''&lt;/includeonly&gt;",
		"nodes": [
			{
				"text": "&lt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&gt;",
				"name": "mw-html-entity"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "&lt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&gt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&lt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&gt;",
				"name": "mw-html-entity"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "&lt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&gt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&lt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&gt;",
				"name": "mw-html-entity"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "&lt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&gt;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "Don't escape pre elements that fail to parse as extension tags",
		"wikitext": "<pre>closed is extension tag, so everything is <span>text</span></pre>\n<pre>unclosed is not, so these are <span>tags</span>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "closed is extension tag, so everything is <span>text</span>",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "unclosed is not, so these are <span>tags</span>",
				"name": "mw-tag-pre"
			}
		]
	},
	{
		"desc": "New list is serialized on newlines",
		"wikitext": "The quick brown fox jumps over the lazy dog.\n\n* Yesterday\n* Today\n* Tomorrow\n\nThe quick onyx goblin jumps over the lazy dwarf.",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "New lists in formatting elements serialized w/o newlines",
		"wikitext": "<small>\n* 123\n</small>\n\n<small>\n* hi\n</small>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "New list in table doesn't need newlines",
		"wikitext": "{|\n|\n* test\n* 123\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Newly inserted noinclude tags do not need newlines before/after",
		"wikitext": "a<noinclude>b</noinclude>c",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped",
		"wikitext": "a\n\nb\n\n'''c'''\n\nd\n{|\n|a\nb\n|'''c'''\nd\n|}",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "c",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "c",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Anchor without href scenarios",
		"wikitext": "dice\n<span name=\"foo\"></span>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "name=",
				"name": "attributeName"
			},
			{
				"text": "\"foo\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "New transclusion added after a list should be serialized after the list",
		"wikitext": "* a\n{{1x|foo}}",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Only html p-tag is strong indent pre suppressing",
		"wikitext": "test2<span>\ntest3\n</span>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T238721: New transclusion without the \"i\" property for a template part should be handled properly",
		"wikitext": "{{1x}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Selser: New comments should not be lost",
		"wikitext": "<span id=\"a\">a</span>\n\n<span id=\"b\">b</span>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"a\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"b\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)",
		"wikitext": "<div style=\"{{1x|color:red;}}%\">foo</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "color:red;",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "%\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Empty LI (T49673)",
		"wikitext": "*a\n* \n*\n*b",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Empty list item with rendering transparent tag",
		"wikitext": "{{1x|*hmm\n*[[category:123]]}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "*hmm",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "*",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "category:123",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "unclosed internal link XSS (T137264)",
		"wikitext": "[[#%3Cscript%3Ealert(1)%3C/script%3E|",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "%3Cscript%3Ealert(1)%3C/script%3E",
				"name": "mw-link-ground className"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			}
		]
	},
	{
		"desc": "Validating that <style> isn't eaten by tidy (T167349)",
		"wikitext": "<div class=\"foo\">\n<style>.foo::before { content: \"<foo>\"; }</style>\n<style data-mw-foobar=\"baz\">.foo::after { content: \"<bar>\"; }</style>\n</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "class=",
				"name": "attributeName"
			},
			{
				"text": "\"foo\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Validating that <style> isn't wrapped in a paragraph (T186965)",
		"wikitext": "A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph\n\n<style>.foo::before { content: \"<foo>\"; }</style>\n\n<style>.foo::before { content: \"<foo>\"; }</style> <link rel=\"foo\" href=\"bar\"/><style>.foo::before { content: \"<foo>\"; }</style>\n\nBut if it's on a line with other content, let it be wrapped.\n\n<style>.foo::before { content: \"<foo>\"; }</style> bar\n\nfoo <style>.foo::before { content: \"<foo>\"; }</style>\n\nfoo <style>.foo::before { content: \"<foo>\"; }</style> bar\n\nAnd the same if we have non-paragraph-breaking whitespace\n\nfoo\n<style>.foo::before { content: \"<foo>\"; }</style>\nbar",
		"nodes": []
	},
	{
		"desc": "Validating that <link> isn't wrapped in a paragraph (T186965)",
		"wikitext": "A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph\n\n<link rel=\"foo\" href=\"bar\"/>\n\n<link rel=\"foo\" href=\"bar\"/> <style>.foo::before { content: \"<foo>\"; }</style><link rel=\"foo\" href=\"bar\"/>\n\nBut if it's on a line with other content, let it be wrapped.\n\n<link rel=\"foo\" href=\"bar\"/> bar\n\nfoo <link rel=\"foo\" href=\"bar\"/>\n\nfoo <link rel=\"foo\" href=\"bar\"/> bar\n\nAnd the same if we have non-paragraph-breaking whitespace\n\nfoo\n<link rel=\"foo\" href=\"bar\"/>\nbar",
		"nodes": []
	},
	{
		"desc": "Extension returning multiple nodes starting with a style tag roundtrips",
		"wikitext": "<table>\n{{1x|<html><style>.hi { color: red; }</style>\n</html>}}\n<tr><td class=\"hi\">ho</td></tr>\n</table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<html><style>.hi { color: red; }</style>",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</html>",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td ",
				"name": "tagName"
			},
			{
				"text": "class=",
				"name": "attributeName"
			},
			{
				"text": "\"hi\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Decoding of HTML entities in embedded HTML tags",
		"wikitext": "<table class=\"1&2&amp;3&amp;amp;4&amp;amp;amp;5\"><tr><td>x</td></tr></table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table ",
				"name": "tagName"
			},
			{
				"text": "class=",
				"name": "attributeName"
			},
			{
				"text": "\"1&2",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "3",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "amp;4",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "amp;amp;5\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T51672: Test for brackets in attributes of elements in external link texts",
		"wikitext": "[http://example.com/ link <span title=\"title with [brackets]\">span</span>]\n[http://example.com/ link <span title=\"title with &#91;brackets&#93;\">span</span>]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com/",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "link ",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "<",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span ",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "title=",
				"name": "mw-link-ground attributeName"
			},
			{
				"text": "\"title with [brackets]\"",
				"name": "mw-link-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "</",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com/",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "link ",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "<",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span ",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "title=",
				"name": "mw-link-ground attributeName"
			},
			{
				"text": "\"title with ",
				"name": "mw-link-ground mw-htmltag-attribute-value"
			},
			{
				"text": "&#91;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "brackets",
				"name": "mw-link-ground mw-htmltag-attribute-value"
			},
			{
				"text": "&#93;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "\"",
				"name": "mw-link-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "</",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "T72875: Test for brackets in attributes of elements in internal link texts",
		"wikitext": "[[Foo|link <span title=\"title with [[double brackets]]\">span</span>]]\n[[Foo|link <span title=\"title with &#91;&#91;double brackets&#93;&#93;\">span</span>]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link ",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span ",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "title=",
				"name": "mw-link-ground attributeName"
			},
			{
				"text": "\"title with [[double brackets]]\"",
				"name": "mw-link-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-link-ground string"
			},
			{
				"text": "</",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link ",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span ",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "title=",
				"name": "mw-link-ground attributeName"
			},
			{
				"text": "\"title with ",
				"name": "mw-link-ground mw-htmltag-attribute-value"
			},
			{
				"text": "&#91;&#91;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "double brackets",
				"name": "mw-link-ground mw-htmltag-attribute-value"
			},
			{
				"text": "&#93;&#93;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "\"",
				"name": "mw-link-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-link-ground string"
			},
			{
				"text": "</",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T199926: html arrow wt: Parsoid sometimes trips up on verticalbar chars in hrefs",
		"wikitext": "[[stats:v2/#/fr.wikipedia.org/reading/page-views-by-country/normal%7Cmap%7C2-Year~2016060100~2018071100%7C~total|9]]\n[[stats:v2/#/fr.wikipedia.org/reading/page-views-by-country/normal%7Cmap%7C2-Year~2016060100~2018071100%7C~total|10]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "stats:v2/",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "/fr.wikipedia.org/reading/page-views-by-country/normal%7Cmap%7C2-Year~2016060100~2018071100%7C~total",
				"name": "mw-link-ground className"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "9",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "stats:v2/",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "/fr.wikipedia.org/reading/page-views-by-country/normal%7Cmap%7C2-Year~2016060100~2018071100%7C~total",
				"name": "mw-link-ground className"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "10",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T199926: Hash only interwiki link",
		"wikitext": "[[meatball:Test#1/2]]\n[[gerrit:#/q/project:mediawiki/services/parsoid|Gerrit]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:Test",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "1/2",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "gerrit:",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "/q/project:mediawiki/services/parsoid",
				"name": "mw-link-ground className"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Gerrit",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T179544: {{anchorencode:}} output should be always usable in links",
		"wikitext": "<span id=\"{{anchorencode:[foo]}}\"></span>[[#{{anchorencode:[foo]}}]]",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "anchorencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "[foo]",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "{{",
				"name": "mw-ext-link-ground paren"
			},
			{
				"text": "anchorencode",
				"name": "mw-ext-link-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-link-ground punctuation"
			},
			{
				"text": "[foo]",
				"name": "mw-ext-link-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-link-ground paren"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T222419: Section numbering after unclosed template/parser function",
		"wikitext": "== Foo ==\n{{subst: a surname\n== Bar ==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " Foo ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "subst",
				"name": "mw-template-ground keyword"
			},
			{
				"text": ": ",
				"name": "mw-template-ground punctuation"
			},
			{
				"text": "a surname",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " Bar ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Trim whitespace in wikitext headings, list items, table captions, headings, and cells",
		"wikitext": "__NOTOC__\n==    <!--c1-->  <!--c2--> Spaces   <!--c3--> <!--c4-->  ==\n==\t\t<!--c1-->\t<!--c2--> Tabs\t\t<!--c3--><!--c4-->\t==\n== <!--Headings with fallback ids--> Личная жизнь ==\n*     <!--c1-->   <!--c2-->  List item <!--c3--> <!--c4-->\n; <!--term to define--> term : <!--term's definition--> definition\n{|\n|+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->\n|-\n!  <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !!   Table Heading 2 <!--c5-->\n|-\n| <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> ||   Table Cell 2 <!--c5-->\n|-\n| class=\"foo\" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->\n|-\n| <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content\n|}\n: {|\n  |  <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> ||   Table Cell 2 <!--c5-->\n  |} foo   <!--c1-->",
		"nodes": [
			{
				"text": "__NOTOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "    ",
				"name": "mw-section"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			},
			{
				"text": "  ",
				"name": "mw-section"
			},
			{
				"text": "<!--c2-->",
				"name": "comment"
			},
			{
				"text": " Spaces   ",
				"name": "mw-section"
			},
			{
				"text": "<!--c3-->",
				"name": "comment"
			},
			{
				"text": " ",
				"name": "mw-section"
			},
			{
				"text": "<!--c4-->",
				"name": "comment"
			},
			{
				"text": "  ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "\t\t",
				"name": "mw-section"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			},
			{
				"text": "\t",
				"name": "mw-section"
			},
			{
				"text": "<!--c2-->",
				"name": "comment"
			},
			{
				"text": " Tabs\t\t",
				"name": "mw-section"
			},
			{
				"text": "<!--c3--><!--c4-->",
				"name": "comment"
			},
			{
				"text": "\t",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " ",
				"name": "mw-section"
			},
			{
				"text": "<!--Headings with fallback ids-->",
				"name": "comment"
			},
			{
				"text": " Личная жизнь ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			},
			{
				"text": "<!--c2-->",
				"name": "comment"
			},
			{
				"text": "<!--c3-->",
				"name": "comment"
			},
			{
				"text": "<!--c4-->",
				"name": "comment"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": " ",
				"name": "mw-strong"
			},
			{
				"text": "<!--term to define-->",
				"name": "comment"
			},
			{
				"text": " term ",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "<!--term's definition-->",
				"name": "comment"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|+ ",
				"name": "typeOperator"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			},
			{
				"text": " ",
				"name": "mw-table-caption"
			},
			{
				"text": "<!--c2-->",
				"name": "comment"
			},
			{
				"text": " Table Caption ",
				"name": "mw-table-caption"
			},
			{
				"text": "<!--c3-->",
				"name": "comment"
			},
			{
				"text": " ",
				"name": "mw-table-caption"
			},
			{
				"text": "<!--c4-->",
				"name": "comment"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "!  ",
				"name": "typeOperator"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			},
			{
				"text": " ",
				"name": "mw-strong"
			},
			{
				"text": "<!--c2-->",
				"name": "comment"
			},
			{
				"text": " Table Heading 1 ",
				"name": "mw-strong"
			},
			{
				"text": "<!--c3-->",
				"name": "comment"
			},
			{
				"text": " ",
				"name": "mw-strong"
			},
			{
				"text": "<!--c4-->",
				"name": "comment"
			},
			{
				"text": " ",
				"name": "mw-strong"
			},
			{
				"text": "!!",
				"name": "typeOperator"
			},
			{
				"text": "   Table Heading 2 ",
				"name": "mw-strong"
			},
			{
				"text": "<!--c5-->",
				"name": "comment"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			},
			{
				"text": "<!--c2-->",
				"name": "comment"
			},
			{
				"text": "<!--c3-->",
				"name": "comment"
			},
			{
				"text": "<!--c4-->",
				"name": "comment"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "<!--c5-->",
				"name": "comment"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			},
			{
				"text": "<!--c2-->",
				"name": "comment"
			},
			{
				"text": "<!--c3-->",
				"name": "comment"
			},
			{
				"text": "<!--c4-->",
				"name": "comment"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "one",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "two",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<!--c2-->",
				"name": "comment"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<!--c3-->",
				"name": "comment"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": ": ",
				"name": "operatorKeyword"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "  |  ",
				"name": "typeOperator"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			},
			{
				"text": "<!--c2-->",
				"name": "comment"
			},
			{
				"text": "<!--c3-->",
				"name": "comment"
			},
			{
				"text": "<!--c4-->",
				"name": "comment"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "<!--c5-->",
				"name": "comment"
			},
			{
				"text": "  |}",
				"name": "null"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Do not trim whitespace in HTML headings, list items, table captions, headings, and cells",
		"wikitext": "__NOTOC__\n<h2>    <!--c1-->   <!--c2--> Heading    <!--c3--> <!--c4-->  </h2>\n<ul><li>     <!--c1-->   <!--c2-->  List item <!--c3--> <!--c4-->  </li></ul>\n<table>\n<tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>\n<tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>\n</table>",
		"nodes": [
			{
				"text": "__NOTOC__",
				"name": "controlKeyword"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "h2",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			},
			{
				"text": "<!--c2-->",
				"name": "comment"
			},
			{
				"text": "<!--c3-->",
				"name": "comment"
			},
			{
				"text": "<!--c4-->",
				"name": "comment"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "h2",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			},
			{
				"text": "<!--c2-->",
				"name": "comment"
			},
			{
				"text": "<!--c3-->",
				"name": "comment"
			},
			{
				"text": "<!--c4-->",
				"name": "comment"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "th",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			},
			{
				"text": "<!--c2-->",
				"name": "comment"
			},
			{
				"text": "<!--c3-->",
				"name": "comment"
			},
			{
				"text": "<!--c4-->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "th",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</tr>",
				"name": "mw-error"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			},
			{
				"text": "<!--c2-->",
				"name": "comment"
			},
			{
				"text": "<!--c3-->",
				"name": "comment"
			},
			{
				"text": "<!--c4-->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "th",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</tr>",
				"name": "mw-error"
			},
			{
				"text": "</table>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "Do not trim whitespace in links and quotes",
		"wikitext": "foo ''  <!--c1--> italic <!--c2-->   '' and '''  <!--c3-->  bold  <!--c4-->  '''\n[[Foo|  some text  ]]",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "  ",
				"name": "mw-em"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			},
			{
				"text": " italic ",
				"name": "mw-em"
			},
			{
				"text": "<!--c2-->",
				"name": "comment"
			},
			{
				"text": "   ",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "  ",
				"name": "mw-strong"
			},
			{
				"text": "<!--c3-->",
				"name": "comment"
			},
			{
				"text": "  bold  ",
				"name": "mw-strong"
			},
			{
				"text": "<!--c4-->",
				"name": "comment"
			},
			{
				"text": "  ",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|  ",
				"name": "mw-link-ground operator"
			},
			{
				"text": "some text  ",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Remove p tags surrounding a single element in a figcaption",
		"wikitext": "[[File:Foobar.jpg|right|200x200px|Caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "200x200px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Selser preserves lack of newline before list and allows newline after the list",
		"wikitext": "header\n*foo\n*bar",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Selser does not introduce newlines between unedited paragraph preceding the list",
		"wikitext": "{|\n|\nheader\n*foo\n*bar\nfooter\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Selser does not introduce newlines between unedited paragraph following the list",
		"wikitext": "{|\n|\nheader\n*foo\n*bar\nfooter\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Remove a list item but do not insert newline above list",
		"wikitext": "header\n*foo\n*bar\nfooter",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Spaced heading with element",
		"wikitext": "=== hi <span id=\"x\">hi</span> hi ho ===",
		"nodes": [
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": " hi ",
				"name": "mw-section"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"x\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "hi",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " hi ho ",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Allow tabindex 0",
		"wikitext": "<div tabindex=\"0\">A</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "tabindex=",
				"name": "attributeName"
			},
			{
				"text": "\"0\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Don't allow tabindex -1",
		"wikitext": "<div tabindex=\"-1\">A</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "tabindex=",
				"name": "attributeName"
			},
			{
				"text": "\"-1\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Don't Allow tabindex > 0",
		"wikitext": "<div tabindex=\"3\">A</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "tabindex=",
				"name": "attributeName"
			},
			{
				"text": "\"3\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "aside tag is not allowed directly in wikitext (T278565)",
		"wikitext": "<aside>This aside tag in wikitext should be escaped</aside>",
		"nodes": []
	},
	{
		"desc": "Stripped tag in list",
		"wikitext": ":<i>hi</i></b>",
		"nodes": [
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</b>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "Misnested link nested in span",
		"wikitext": ": [http://google.com <span>[[Lala]]:</span>ok]-hi",
		"nodes": [
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "google.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "<",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "[[Lala",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Preserve the order invalid attributes",
		"wikitext": "<div width=\"95%\" style=\"border: 3px solid darkblue\">hi",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "width=",
				"name": "attributeName"
			},
			{
				"text": "\"95%\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " style=",
				"name": "attributeName"
			},
			{
				"text": "\"border: 3px solid darkblue\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Include directive string gluing",
		"wikitext": "<noinclude>{{1x|</noinclude>testing<noinclude>}}</noinclude>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "noinclude",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "testing",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "noinclude",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "1. Include directive in template target",
		"wikitext": "{{1x<noinclude>|123</noinclude>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "noinclude",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "123",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "noinclude",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "2. Include directive in template target",
		"wikitext": "{{1x<includeonly>|123</includeonly>|345}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "includeonly",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "123",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "includeonly",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "345",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "3. Include directive in template target",
		"wikitext": "{{1x<onlyinclude>|123</onlyinclude>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "123",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "4. Include directive in template target",
		"wikitext": "{{{{{1<noinclude>|1x</noinclude>}}}|123}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{{",
				"name": "mw-template-ground brace"
			},
			{
				"text": "1<noinclude>",
				"name": "mw-template-ground variableName"
			},
			{
				"text": "|",
				"name": "mw-template-ground mw-templatevariable-delimiter"
			},
			{
				"text": "1x",
				"name": "mw-template-ground atom"
			},
			{
				"text": "</noinclude>",
				"name": "mw-error"
			},
			{
				"text": "}}}",
				"name": "mw-template-ground brace"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "123",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "{{#contentmodel}} parser function",
		"wikitext": "{{#contentmodel}}\n\n{{#contentmodel:local}}\n\n{{#contentmodel:canonical}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#contentmodel",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#contentmodel",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "local",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#contentmodel",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "canonical",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "{{#contentmodel}} parser function on a CSS page",
		"wikitext": "{{#contentmodel}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#contentmodel",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "{{#contentmodel}} parser function on a CSS page (canonical)",
		"wikitext": "{{#contentmodel: canonical}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#contentmodel",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " canonical",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "{{#contentmodel}} parser function for a JS page using the title argument",
		"wikitext": "{{#contentmodel: canonical | MediaWiki:Common.js}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#contentmodel",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " canonical ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " MediaWiki:Common.js",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "1. T400845: Dom/Handlers/CleanUp.php: Added mw:DisplaySpace spaces removal",
		"wikitext": "{|\n|%\n|&nbsp;%\n| %\n| &nbsp;%\n|&nbsp; %\n|  %\n|   %\n|}\n\n*%\n*&nbsp;%\n* %\n* &nbsp;%\n*&nbsp; %\n*  %\n*   %\n\n   % pre 1\n\n''' % BOLD '''",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "|  ",
				"name": "typeOperator"
			},
			{
				"text": "|   ",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": " % BOLD ",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "2. T400845: Dom/Handlers/CleanUp.php: Added mw:DisplaySpace spaces removal",
		"wikitext": "{|\n|%\n|&nbsp;%\n|%\n|&nbsp;%\n|&nbsp; %\n|%\n|%\n|}\n\n*%\n*&nbsp;%\n*%\n*&nbsp;%\n*&nbsp; %\n*%\n*%\n\n   % pre 1\n\n''' % BOLD '''",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": " % BOLD ",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Non extlink in wikilink",
		"wikitext": "[[Test|[123&#93;]]\n[[Example|[<nowiki/>]]\n[[Test|[{{1x|123}}]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Test",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[123",
				"name": "mw-link-ground string"
			},
			{
				"text": "&#93;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Example",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Test",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[",
				"name": "mw-link-ground string"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "123",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Wikilink extlink precedence",
		"wikitext": "[[Test|[http://google.com test]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Test",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[http://google.com test",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Nowikis can be considered pwrap optional based on content",
		"wikitext": "{{1x|<nowiki />[[category:123]]<div>123</div>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki ",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "category:123",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "123",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "basic, single category list, ordered by cat add, desc.",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "basic, single category list, but ascending",
		"wikitext": "<DynamicPageList>\norder =   ascending\ncategory=DPLtest\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "order =   ascending",
				"name": "mw-exttag"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "nofollow",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\nnofollow=true\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "nofollow=true",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "supresserrors",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\ncategory=DPLtest1\ncategory=DPLtest2\ncategory=DPLtest3\ncategory=DPLtest4\ncategory=DPLtest5\ncategory=DPLtest7\ncategory=DPLtest6\ncategory=DPLtest8\ncategory=DPLtest9\ncategory=DPLtest10\nsuppresserrors=true\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "category=DPLtest1",
				"name": "mw-exttag"
			},
			{
				"text": "category=DPLtest2",
				"name": "mw-exttag"
			},
			{
				"text": "category=DPLtest3",
				"name": "mw-exttag"
			},
			{
				"text": "category=DPLtest4",
				"name": "mw-exttag"
			},
			{
				"text": "category=DPLtest5",
				"name": "mw-exttag"
			},
			{
				"text": "category=DPLtest7",
				"name": "mw-exttag"
			},
			{
				"text": "category=DPLtest6",
				"name": "mw-exttag"
			},
			{
				"text": "category=DPLtest8",
				"name": "mw-exttag"
			},
			{
				"text": "category=DPLtest9",
				"name": "mw-exttag"
			},
			{
				"text": "category=DPLtest10",
				"name": "mw-exttag"
			},
			{
				"text": "suppresserrors=true",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "Negation with namespace.",
		"wikitext": "<DynamicPageList>\nnamespace=talk\nnotcategory=DPLtest3\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "namespace=talk",
				"name": "mw-exttag"
			},
			{
				"text": "notcategory=DPLtest3",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "Namespace limited to category.",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\nnamespace=talk\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "namespace=talk",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "Namespace no category.",
		"wikitext": "<DynamicPageList>\nnamespace=help\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "namespace=help",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "Don't show namespace name. (shownamespace=false)",
		"wikitext": "<DynamicPageList>\nnamespace=help\nshownamespace=false\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "namespace=help",
				"name": "mw-exttag"
			},
			{
				"text": "shownamespace=false",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "Invalid ns treated as main namespace",
		"wikitext": "<DynamicPageList>\nnamespace=Look mummy, this totally isn't a namespace\ncount=2\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "namespace=Look mummy, this totally isn't a namespace",
				"name": "mw-exttag"
			},
			{
				"text": "count=2",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "count and offset combined.",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\ncount=1\noffset=1\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "count=1",
				"name": "mw-exttag"
			},
			{
				"text": "offset=1",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "include redirects",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\nredirects=include\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "redirects=include",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "only redirect",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\nredirects=only\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "redirects=only",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "addfirstcategorydate=INVALID",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\naddfirstcategorydate=INVALID\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "addfirstcategorydate=INVALID",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "addfirstcategorydate=false",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\naddfirstcategorydate=false\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "addfirstcategorydate=false",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "mode=unordered (default)",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\nmode=unordered\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "mode=unordered",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "mode=INVALID",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\nmode=INVALID\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "mode=INVALID",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "mode=ordered",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\nmode=ordered\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "mode=ordered",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "mode=none (line breaks)",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\nmode=none\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "mode=none",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "mode=inline (comma list)",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\nmode=inline\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "mode=inline",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "mode=gallery (complex, no image)",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\nimagewidth=70\ngalleryshowfilesize=yes\ngalleryshowfilename=yes\nimagesperrow=7\ngallerycaption=Look at my pretty gallery. {{SERVER}}\nmode=gallery\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "imagewidth=70",
				"name": "mw-exttag"
			},
			{
				"text": "galleryshowfilesize=yes",
				"name": "mw-exttag"
			},
			{
				"text": "galleryshowfilename=yes",
				"name": "mw-exttag"
			},
			{
				"text": "imagesperrow=7",
				"name": "mw-exttag"
			},
			{
				"text": "gallerycaption=Look at my pretty gallery. {{SERVER}}",
				"name": "mw-exttag"
			},
			{
				"text": "mode=gallery",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "mode=gallery (simple, no image)",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\nmode=gallery\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "mode=gallery",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "mode=gallery (complex, with image + bad image)",
		"wikitext": "<DynamicPageList>\nmode=gallery\nnamespace=file\naddfirstcategorydate=ymd\nimagewidth=70\ngalleryshowfilesize=yes\ngalleryshowfilename=yes\nimagesperrow=7\ngallerycaption=I love Captions\nordermethod=sortkey\norder=descending\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "mode=gallery",
				"name": "mw-exttag"
			},
			{
				"text": "namespace=file",
				"name": "mw-exttag"
			},
			{
				"text": "addfirstcategorydate=ymd",
				"name": "mw-exttag"
			},
			{
				"text": "imagewidth=70",
				"name": "mw-exttag"
			},
			{
				"text": "galleryshowfilesize=yes",
				"name": "mw-exttag"
			},
			{
				"text": "galleryshowfilename=yes",
				"name": "mw-exttag"
			},
			{
				"text": "imagesperrow=7",
				"name": "mw-exttag"
			},
			{
				"text": "gallerycaption=I love Captions",
				"name": "mw-exttag"
			},
			{
				"text": "ordermethod=sortkey",
				"name": "mw-exttag"
			},
			{
				"text": "order=descending",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "mode=gallery (simple showfilesize, no image)",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\nmode=gallery\ngalleryshowfilesize=yes\ngalleryshowfilename=no\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "mode=gallery",
				"name": "mw-exttag"
			},
			{
				"text": "galleryshowfilesize=yes",
				"name": "mw-exttag"
			},
			{
				"text": "galleryshowfilename=no",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "ordermethod=created (by article id)",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\nordermethod=created\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "ordermethod=created",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "ordermethod=length",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\nordermethod=length\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "ordermethod=length",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "ordermethod=sortkey",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\nordermethod=sortkey\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "ordermethod=sortkey",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "ordermethod=categorysortkey",
		"wikitext": "<DynamicPageList>\ncategory=DPLtest\nordermethod=categorysortkey\norder=ascending\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category=DPLtest",
				"name": "mw-exttag"
			},
			{
				"text": "ordermethod=categorysortkey",
				"name": "mw-exttag"
			},
			{
				"text": "order=ascending",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "Magic word in category clause",
		"wikitext": "<DynamicPageList>\ncategory={{PAGENAME:DPLtest}}\n</DynamicPageList>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "category={{PAGENAME:DPLtest}}",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			},
			{
				"text": "DynamicPageList",
				"name": "mw-exttag-name mw-ext-dynamicpagelist"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-dynamicpagelist"
			}
		]
	},
	{
		"desc": "Multiple <onlyinclude> being included",
		"wikitext": "{{Includes4}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Includes4",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "#vardefine at SOL",
		"wikitext": "{{#vardefine:test|heading}}==Heading==\n{{#vardefine:test|hr}}----\n{{#vardefine:test|list}};dt:dd\n{{#vardefine:test|table}}{|\n|-\n! !!\n|}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#vardefine",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "heading",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#vardefine",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "hr",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#vardefine",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "list",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#vardefine",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "table",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Case-sensitive behavior switches in lower cases",
		"wikitext": "__index__",
		"nodes": []
	},
	{
		"desc": "Category / whitespace (newline and non-newline) interactions",
		"wikitext": "x\n[[Category:A]] [[Category:B]]\ny",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:A",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:B",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Nested file links",
		"wikitext": "[[file:thumb.jpg|[[file:thumb.png|Thumb|thumb]]|thumb]]\n[[file:thumb.jpg|[[file:thumb.png|[[T]]humb|thumb]]|thumb]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "file:thumb.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "file:thumb.png",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Thumb",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "file:thumb.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "file:thumb.png",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "T",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "humb",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "&lt; in an external link",
		"wikitext": "[https://mediawiki.org/&LT;&lt;text]\n[https://mediawiki.org/&GT;&gt;text]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "https://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "mediawiki.org/",
				"name": "mw-link-ground url"
			},
			{
				"text": "&LT;&lt;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "text",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "https://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "mediawiki.org/",
				"name": "mw-link-ground url"
			},
			{
				"text": "&GT;&gt;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "text",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Magic links in lower cases",
		"wikitext": "pmid 1 PMID 1\nrfc 1 RFC 1\nisbn 1234567890 ISBN 1234567890",
		"nodes": []
	},
	{
		"desc": "Font of text following an external link",
		"wikitext": "[//a ''b]c",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "//",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "a",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "''",
				"name": "mw-link-ground character"
			},
			{
				"text": "b",
				"name": "mw-link-ground labelName mw-em"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "c",
				"name": "mw-em"
			}
		]
	},
	{
		"desc": "Interaction between apostrophes and <b> tags",
		"wikitext": "'''a</b>b<b>c'''d",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "a",
				"name": "mw-strong"
			},
			{
				"text": "</b>",
				"name": "mw-error"
			},
			{
				"text": "b",
				"name": "mw-strong"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "c",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Function hook and variable",
		"wikitext": "{{uc}}{{server:}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "uc",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "server",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "New tvar syntax",
		"wikitext": "<translate><tvar name=\"name\">contents</tvar></translate>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "translate",
				"name": "mw-exttag-name mw-ext-translate"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "<tvar name=\"name\">contents</tvar>",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "translate",
				"name": "mw-exttag-name mw-ext-translate"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-translate"
			}
		]
	},
	{
		"desc": "Unicode number before autolinks",
		"wikitext": "１http://example.com",
		"nodes": []
	},
	{
		"desc": "Common prefix ';'",
		"wikitext": ";;;t3:::d3\n;;;;;t5::::::d5\n\n;t1\n;*t1:d1\n;*t1:d1",
		"nodes": [
			{
				"text": ";;;",
				"name": "list"
			},
			{
				"text": "t3",
				"name": "mw-strong"
			},
			{
				"text": ":::",
				"name": "operatorKeyword"
			},
			{
				"text": ";;;;;",
				"name": "list"
			},
			{
				"text": "t5",
				"name": "mw-strong"
			},
			{
				"text": ":::::",
				"name": "operatorKeyword"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "t1",
				"name": "mw-strong"
			},
			{
				"text": ";*",
				"name": "list"
			},
			{
				"text": "t1",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": ";*",
				"name": "list"
			},
			{
				"text": "t1",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "Extension tag in language conversion",
		"wikitext": "-{<pre>foo</pre>}-\n\n-{<pre>foo</pre>|bar}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "foo",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "foo",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Template in language conversion",
		"wikitext": "-{{{1x|foo}} }-\n\n-{{{1x|foo}}|bar}-",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template variable in language conversion",
		"wikitext": "-{{{{foo}}} }-\n\n-{{{{foo}}}|bar}-\n\n-{{{{foo|baz}}} }-\n\n-{{{{foo|baz}}}|bar}-",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "foo",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "} }-",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "foo",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "}",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "bar}-",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "-",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template3-ground bracket"
			},
			{
				"text": "foo",
				"name": "mw-template3-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template3-ground separator"
			},
			{
				"text": "baz",
				"name": "mw-template3-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template3-ground bracket"
			},
			{
				"text": "} }-",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "-",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template3-ground bracket"
			},
			{
				"text": "foo",
				"name": "mw-template3-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template3-ground separator"
			},
			{
				"text": "baz",
				"name": "mw-template3-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template3-ground bracket"
			},
			{
				"text": "}",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "bar}-",
				"name": "mw-template2-ground attributeValue"
			}
		]
	},
	{
		"desc": "Section heading in language conversion",
		"wikitext": "-{\n==foo==\n}-\n\n-{\n==foo==\n|bar}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "foo",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "foo",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "HTML tag in language conversion",
		"wikitext": "-{<b>foo</b>}-\n\n-{<b>foo</b>|bar}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Table in language conversion",
		"wikitext": "-{\n{|\n|foo\n|}}-\n\n-{\n{|\n|foo\n|}|bar}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Hr in language conversion",
		"wikitext": "-{\n----}-\n\n-{\n----|bar}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "----",
				"name": "contentSeparator"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "----",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Internal link in language conversion",
		"wikitext": "-{[[foo]]}-\n\n-{[[foo]]|bar}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Quote in language conversion",
		"wikitext": "-{''foo''}-\n\n-{''foo''|bar}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "''foo''",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "External link in language conversion",
		"wikitext": "-{[//foo]}-\n\n-{[//foo]|bar}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "//",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "foo",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "//",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "foo",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "List in language conversion",
		"wikitext": "-{\n*foo}-\n\n-{\n*foo|bar}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "*foo",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Magic link in language conversion",
		"wikitext": "-{PMID 1}-\n\n-{PMID 1|bar}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "PMID 1",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Nested <poem><pre>",
		"wikitext": "<poem><pre>\nthis\nis\na\ntest\n</pre></poem>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "<pre>",
				"name": "mw-exttag"
			},
			{
				"text": "this",
				"name": "mw-exttag"
			},
			{
				"text": "is",
				"name": "mw-exttag"
			},
			{
				"text": "a",
				"name": "mw-exttag"
			},
			{
				"text": "test",
				"name": "mw-exttag"
			},
			{
				"text": "</pre>",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			}
		]
	},
	{
		"desc": "Precedence of table over links",
		"wikitext": "{|\n! [[Foo!!]]\n| [[Bar\n|Baz]]\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "! ",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo!!",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Upper-case language variant is acceptable in conversion rules",
		"wikitext": "-{zh-Hans:a;zh-Hant:b}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Do not translate external URL",
		"wikitext": "<translate>[<tvar name=1>http://example.net</tvar> text]</translate>\n\n[<!-- -->//example.net text]",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "translate",
				"name": "mw-exttag-name mw-ext-translate"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "[<tvar name=1>http://example.net</tvar> text]",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "translate",
				"name": "mw-exttag-name mw-ext-translate"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "<!-- -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Commented <translate> tags",
		"wikitext": "<!-- <translate><tvar name=1></tvar></translate> --><includeonly><translate><tvar name=2></tvar></translate></includeonly>",
		"nodes": [
			{
				"text": "<!-- <translate><tvar name=1></tvar></translate> -->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "translate",
				"name": "mw-exttag-name mw-ext-translate"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "<tvar name=2></tvar>",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "translate",
				"name": "mw-exttag-name mw-ext-translate"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Subpage in #ifexist",
		"wikitext": "{{#ifexist:/ifexist|yes|no}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexist",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "/ifexist",
				"name": "mw-ext-ground unit mw-pagename mw-function-0"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "yes",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Parent directory in #ifexist",
		"wikitext": "{{#ifexist:../ifexist|yes|no}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexist",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "../ifexist",
				"name": "mw-ext-ground unit mw-pagename mw-function-0"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "yes",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Subpage in redirect",
		"wikitext": "#redirect [[/redirect]]",
		"nodes": [
			{
				"text": "#redirect ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "/redirect",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parent directory in redirect",
		"wikitext": "#redirect [[../test]]",
		"nodes": [
			{
				"text": "#redirect ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "../test",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Subpage in image link",
		"wikitext": "[[File:Foobar.jpg|link=/image]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "/image",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parent directory in image link",
		"wikitext": "[[File:Foobar.jpg|link=../test]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "../test",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Japanese behavior switches",
		"wikitext": "＿＿目次非表示＿＿",
		"nodes": []
	},
	{
		"desc": "Basic {{nse:}} test",
		"wikitext": "{{nse:1}}\n\n{{nse:01}}\n\n{{nse:0}}\n\n{{nse:00}}\n\n{{nse:-1}}\n\n{{nse:User}}\n\n{{nse:User_talk}}\n\n{{nse:uSeR tAlK}}\n\n{{nse:File}}\n\n{{nse:Image}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "nse",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "nse",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "01",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "nse",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "0",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "nse",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "00",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "nse",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "nse",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "User",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "nse",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "User_talk",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "nse",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "uSeR tAlK",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "nse",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "File",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "nse",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Image",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Basic {{localurle:}} test",
		"wikitext": "{{localurle: media:top%20level#fragment }}\n\n{{localurle: file:top%20level#fragment | action=edit&preload=\n\n\" }}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "localurle",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " media:top%20level#fragment ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "localurle",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " file:top%20level#fragment ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " action=edit&preload=",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "\" ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Basic {{fullurl:}} test",
		"wikitext": "{{fullurl: media:top%20level#fragment }}\n\n{{fullurle: file:top%20level#fragment | action=edit&preload=\n\n\" }}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "fullurl",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " media:top%20level#fragment ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "fullurle",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " file:top%20level#fragment ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " action=edit&preload=",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "\" ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Basic {{canonicalurl:}} test",
		"wikitext": "{{canonicalurl: media:top%20level#fragment }}\n\n{{canonicalurle: file:top%20level#fragment | action=edit&preload=\n\n\" }}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "canonicalurl",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " media:top%20level#fragment ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "canonicalurle",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " file:top%20level#fragment ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " action=edit&preload=",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "\" ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Basic {{GENDER:}} test",
		"wikitext": "{{GENDER:username|gender-neutral text applicable to all genders}}\n\n{{GENDER:username|text if user is male|text if user is female|text for unspecified gender}}\n\n{{GENDER:|text if user is male|text if user is female|text for unspecified gender}}\n\n{{GENDER:.|text if user is male|text if user is female|text for unspecified gender}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "GENDER",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "username",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "gender-neutral text applicable to all genders",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "GENDER",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "username",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "text if user is male",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "text if user is female",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "text for unspecified gender",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "GENDER",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "text if user is male",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "text if user is female",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "text for unspecified gender",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "GENDER",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": ".",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "text if user is male",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "text if user is female",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "text for unspecified gender",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Basic {{NAMESPACE}} test",
		"wikitext": "{{NAMESPACE:Template talk:Main Page}}\n\n{{NAMESPACEE:Template talk:Main Page}}\n\n{{NAMESPACENUMBER:Template talk:Main Page}}\n\n{{TALKSPACE:Template:Main Page}}\n\n{{TALKSPACEE:Template:Main Page}}\n\n{{SUBJECTSPACE:Template talk:Main Page}}\n\n{{SUBJECTSPACEE:Template talk:Main Page}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "NAMESPACE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Template talk:Main Page",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "NAMESPACEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Template talk:Main Page",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "NAMESPACENUMBER",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Template talk:Main Page",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "TALKSPACE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Template:Main Page",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "TALKSPACEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Template:Main Page",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SUBJECTSPACE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Template talk:Main Page",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SUBJECTSPACEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Template talk:Main Page",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Basic {{DIRMARK}} test",
		"wikitext": "{{DIRMARK}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "DIRMARK",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "T401099",
		"wikitext": "{{#tag:pre|CLICK|data-/onclick=alert(\"CLICKED\")}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "pre",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "CLICK",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "data-/onclick=alert(\"CLICKED\")",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Basic {{#iferror:}} test",
		"wikitext": "{{#iferror:<strong class=\"error\">Expression error.</strong>|yes|no}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#iferror",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "strong ",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": "class=",
				"name": "mw-ext-ground attributeName"
			},
			{
				"text": "\"error\"",
				"name": "mw-ext-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "Expression error.",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "</",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "strong",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "yes",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Basic {{#rel2abs:}} test",
		"wikitext": "{{#rel2abs: /quok | Help:Foo/bar/baz }}\n\n{{#rel2abs: ./quok | Help:Foo/bar/baz }}\n\n{{#rel2abs: ../quok | Help:Foo/bar/baz }}\n\n{{#rel2abs: ../. | Help:Foo/bar/baz }}\n\n{{#rel2abs: ../quok/. | Help:Foo/bar/baz }}\n\n{{#rel2abs: ../../quok | Help:Foo/bar/baz }}\n\n{{#rel2abs: ../../../quok | Help:Foo/bar/baz }}\n\n{{#rel2abs: ../../../../quok | Help:Foo/bar/baz }}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#rel2abs",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " /quok ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " Help:Foo/bar/baz ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#rel2abs",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ./quok ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " Help:Foo/bar/baz ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#rel2abs",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ../quok ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " Help:Foo/bar/baz ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#rel2abs",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ../. ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " Help:Foo/bar/baz ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#rel2abs",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ../quok/. ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " Help:Foo/bar/baz ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#rel2abs",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ../../quok ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " Help:Foo/bar/baz ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#rel2abs",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ../../../quok ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " Help:Foo/bar/baz ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#rel2abs",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ../../../../quok ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " Help:Foo/bar/baz ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Basic {{#rpos:}} test",
		"wikitext": "{{#rpos:Žmržlina|lina}}\n\n{{#rpos:<nowiki>This is a </nowiki>test|test}}\n\n{{#rpos:Žmržlina}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#rpos",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Žmržlina",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "lina",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#rpos",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "This is a ",
				"name": "mw-ext-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#rpos",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Žmržlina",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Basic {{#sub:}} test",
		"wikitext": "{{#sub:Icecream|3}}\n{{#sub:Icecream|0|3}}\n{{#sub:Icecream|-3}}\n{{#sub:Icecream|3|3}}\n{{#sub:Icecream|3|-3}}\n{{#sub:Icecream|-3|2}}\n{{#sub:Icecream|3|0}}\n{{#sub:Icecream|0|3}}\n{{#sub:Icecream|3|-6}}\n{{#sub:Žmržlina|3}}\n{{#sub:<nowiki>This is a </nowiki>test|1}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#sub",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Icecream",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#sub",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Icecream",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "0",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#sub",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Icecream",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#sub",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Icecream",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#sub",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Icecream",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#sub",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Icecream",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#sub",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Icecream",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "0",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#sub",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Icecream",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "0",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#sub",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Icecream",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-6",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#sub",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Žmržlina",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#sub",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "This is a ",
				"name": "mw-ext-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Basic {{#count:}} test",
		"wikitext": "{{#count:ababa|aba}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#count",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ababa",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "aba",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Basic {{#replace:}} test",
		"wikitext": "{{#replace:My_little_home_page|_|<nowiki/> <nowiki/>}}\n{{#replace:Žmržlina|ž|z}}\n{{#replace:Žmržlina|ž|z|0}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#replace",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "My_little_home_page",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "_",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#replace",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Žmržlina",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ž",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "z",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#replace",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Žmržlina",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ž",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "z",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "0",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Basic {{#explode:}} test",
		"wikitext": "{{#explode:And if you tolerate this| |2}}\n{{#explode:String/Functions/Code|/|-1}}\n{{#explode:Split%By%Percentage%Signs|%|2}}\n{{#explode:And if you tolerate this thing and expect no more| |2|3}}\n{{#explode:Žmržlina|ž|1}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#explode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "And if you tolerate this",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#explode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "String/Functions/Code",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "/",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#explode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Split%By%Percentage%Signs",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "%",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#explode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "And if you tolerate this thing and expect no more",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#explode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Žmržlina",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ž",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Basic {{PLURAL:}} test",
		"wikitext": "{{PLURAL:2|is}} → is\n{{PLURAL:0|is|are}} → are\n{{PLURAL:1*1|is|are}} → is\n{{PLURAL:21 mod 10|is|are}} → are\n{{PLURAL:{{#expr:21 mod 10}}|is|are}} → is\n{{PLURAL:1|is|are}} → is\n{{PLURAL:2|is|are}} → are\n{{PLURAL:-1|is|are}} → is\n{{PLURAL:-2|is|are}} → are\n{{PLURAL:0.5|is|are}} → are\n{{PLURAL:1.5|is|are}} → are\n{{PLURAL:-0.5|is|are}} → are\n{{PLURAL:-1.5|is|are}} → are",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PLURAL",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "is",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PLURAL",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "0",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "is",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "are",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PLURAL",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1*1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "is",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "are",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PLURAL",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "21 mod 10",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "is",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "are",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PLURAL",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "#expr",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": "21 mod 10",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "is",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "are",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PLURAL",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "is",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "are",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PLURAL",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "is",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "are",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PLURAL",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "is",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "are",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PLURAL",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "is",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "are",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PLURAL",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "0.5",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "is",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "are",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PLURAL",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1.5",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "is",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "are",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PLURAL",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-0.5",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "is",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "are",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PLURAL",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-1.5",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "is",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "are",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Basic {{filepath:}} test",
		"wikitext": "{{filepath:Wiki.png}}\n\n{{filepath:Wiki.png|nowiki}}\n\n{{filepath:Example.svg|300}}\n\n{{filepath:Example.svg|nowiki|300}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "filepath",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Wiki.png",
				"name": "mw-ext-ground unit mw-pagename mw-function-6"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "filepath",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Wiki.png",
				"name": "mw-ext-ground unit mw-pagename mw-function-6"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "filepath",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Example.svg",
				"name": "mw-ext-ground unit mw-pagename mw-function-6"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "300",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "filepath",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Example.svg",
				"name": "mw-ext-ground unit mw-pagename mw-function-6"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "300",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Attributes of a closing tag",
		"wikitext": "<div>a</div id=a>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			}
		]
	},
	{
		"desc": "External links: invalid character NUL (stripped)",
		"wikitext": "[http://www.example.com test]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "test",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: invalid character backspace (preserved)",
		"wikitext": "[http://www.example.com\b test]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com\b",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "test",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Magic link: invalid character NUL (stripped)",
		"wikitext": "http://www.example.com test",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "www.example.com",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "Magic link: invalid character backspace (preserved)",
		"wikitext": "http://www.example.com\b test",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "www.example.com\b",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "External links: tab character",
		"wikitext": "[http://www.example.com Alice in\tWonderland]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "Alice in\tWonderland",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "U+0338, bare and as entity",
		"wikitext": "Header\n\n== &#x338; One & ==\n&#x338; Text\n\n== ̸ Two & ==\n̸ Text",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " ",
				"name": "mw-section"
			},
			{
				"text": "&#x338;",
				"name": "mw-html-entity"
			},
			{
				"text": " One & ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "&#x338;",
				"name": "mw-html-entity"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " ̸ Two & ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Stray carriage return in text",
		"wikitext": "hiho",
		"nodes": []
	},
	{
		"desc": "Self-closing tag: <categorytree />",
		"wikitext": "<categorytree />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "categorytree ",
				"name": "mw-exttag-name mw-ext-categorytree"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			}
		]
	},
	{
		"desc": "Empty tag: <categorytree></categorytree>",
		"wikitext": "<categorytree></categorytree>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "categorytree",
				"name": "mw-exttag-name mw-ext-categorytree"
			},
			{
				"text": "></",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "categorytree",
				"name": "mw-exttag-name mw-ext-categorytree"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			}
		]
	},
	{
		"desc": "Empty function: {{#categorytree:}}",
		"wikitext": "{{#categorytree:}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#categorytree",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Tag with Unknown category: <categorytree>Unknown category</categorytree>",
		"wikitext": "<categorytree>Unknown category</categorytree>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "categorytree",
				"name": "mw-exttag-name mw-ext-categorytree"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "Unknown category",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "categorytree",
				"name": "mw-exttag-name mw-ext-categorytree"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			}
		]
	},
	{
		"desc": "Function with Unknown category: {{#categorytree:Unknown category}}",
		"wikitext": "{{#categorytree:Unknown category}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#categorytree",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Unknown category",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Tag with Unknown category and parameters: <categorytree mode=all depth=2 showcount=1>Unknown category</categorytree>",
		"wikitext": "<categorytree mode=all depth=2 showcount=1>Unknown category</categorytree>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "categorytree ",
				"name": "mw-exttag-name mw-ext-categorytree"
			},
			{
				"text": "mode=",
				"name": "mw-exttag-attribute mw-ext-categorytree"
			},
			{
				"text": "all",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " depth=",
				"name": "mw-exttag-attribute mw-ext-categorytree"
			},
			{
				"text": "2",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " showcount=",
				"name": "mw-exttag-attribute mw-ext-categorytree"
			},
			{
				"text": "1",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "Unknown category",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "categorytree",
				"name": "mw-exttag-name mw-ext-categorytree"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			}
		]
	},
	{
		"desc": "Tag with Category:CategoryTree test category",
		"wikitext": "<categorytree>CategoryTree test category</categorytree>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "categorytree",
				"name": "mw-exttag-name mw-ext-categorytree"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "CategoryTree test category",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "categorytree",
				"name": "mw-exttag-name mw-ext-categorytree"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			}
		]
	},
	{
		"desc": "Tag with Category:CategoryTree test category 2 and hideroot=1",
		"wikitext": "<categorytree hideroot=1>CategoryTree test category 2</categorytree>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "categorytree ",
				"name": "mw-exttag-name mw-ext-categorytree"
			},
			{
				"text": "hideroot=",
				"name": "mw-exttag-attribute mw-ext-categorytree"
			},
			{
				"text": "1",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "CategoryTree test category 2",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "categorytree",
				"name": "mw-exttag-name mw-ext-categorytree"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			}
		]
	},
	{
		"desc": "Tag with CategoryTree root and two subcategories",
		"wikitext": "<categorytree>CategoryTree root</categorytree>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "categorytree",
				"name": "mw-exttag-name mw-ext-categorytree"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "CategoryTree root",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "categorytree",
				"name": "mw-exttag-name mw-ext-categorytree"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			}
		]
	},
	{
		"desc": "Tag with CategoryTree root and two subcategories and showcount=on",
		"wikitext": "<categorytree showcount=on>CategoryTree root</categorytree>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "categorytree ",
				"name": "mw-exttag-name mw-ext-categorytree"
			},
			{
				"text": "showcount=",
				"name": "mw-exttag-attribute mw-ext-categorytree"
			},
			{
				"text": "on",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "CategoryTree root",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "categorytree",
				"name": "mw-exttag-name mw-ext-categorytree"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			}
		]
	},
	{
		"desc": "Tag with CategoryTree root and two subcategories and depth=0",
		"wikitext": "<categorytree depth=0>CategoryTree root</categorytree>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "categorytree ",
				"name": "mw-exttag-name mw-ext-categorytree"
			},
			{
				"text": "depth=",
				"name": "mw-exttag-attribute mw-ext-categorytree"
			},
			{
				"text": "0",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "CategoryTree root",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			},
			{
				"text": "categorytree",
				"name": "mw-exttag-name mw-ext-categorytree"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-categorytree"
			}
		]
	},
	{
		"desc": "Simple <ref>, no <references/>",
		"wikitext": "Wikipedia rocks!<ref>Proceeds of Rockology, vol. XXI</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Proceeds of Rockology, vol. XXI",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Simple <ref>, no <references/>, page ends in a list",
		"wikitext": "blah<ref>foo</ref> --Matma Rex 17:35, 31 March 2020 (UTC)\n* bleh --Matma Rex 17:35, 31 March 2020 (UTC)",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Simple <ref>, with <references/>",
		"wikitext": "Wikipedia rocks!<ref>Proceeds of Rockology, vol. XXI</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Proceeds of Rockology, vol. XXI",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "<ref> with a simple template",
		"wikitext": "Templating<ref>{{simple template}}</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "simple template",
				"name": "mw-tag-ref mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "<ref> with a <nowiki>",
		"wikitext": "Templating<ref><nowiki>{{simple template}}</nowiki></ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-ref mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-tag-ref mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-tag-ref mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "{{simple template}}",
				"name": "mw-tag-ref mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-tag-ref mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-tag-ref mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-tag-ref mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "<ref> in a <nowiki>",
		"wikitext": "Templating<nowiki><ref>{{simple template}}</ref></nowiki>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<ref>{{simple template}}</ref>",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "<ref> in a <!--comment-->",
		"wikitext": "Templating<!--<ref>{{simple template}}</ref>-->\n\n<references />",
		"nodes": [
			{
				"text": "<!--<ref>{{simple template}}</ref>-->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "<!--comment--> in a <ref> (T7384)",
		"wikitext": "Templating<ref>Text<!--comment--></ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Text",
				"name": "mw-tag-ref"
			},
			{
				"text": "<!--comment-->",
				"name": "mw-tag-ref comment"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "<ref> in an ignored caption (T235656)",
		"wikitext": "[[File:Foobar.jpg|frameless|ignored caption with a ref<ref>boo</ref>]]\n\n<references />",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frameless",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "ignored caption with a ref",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-link-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "boo",
				"name": "mw-link-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-link-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "<ref> in expanded attributes of tags (legitimate or otherwise)",
		"wikitext": "{|\n|- <ref>boo</ref>\n|x\n|}\n<references />",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|- ",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "boo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "<references> after <gallery> (bug 6164)",
		"wikitext": "<ref>one</ref>\n\n<gallery>Image:Foobar.jpg</gallery>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "one",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "{{REVISIONID}} on page with <ref> (bug 6299)",
		"wikitext": "{{REVISIONID}}<ref>elite</ref>",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONID",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "elite",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "{{REVISIONID}} on page without <ref> (bug 6299 sanity check)",
		"wikitext": "{{REVISIONID}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONID",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Ref with content followed by blank ref",
		"wikitext": "<ref name=\"blank\">content</ref>\n\n<ref name=\"blank\" />\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"blank\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "content",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"blank\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Blank ref followed by ref with content",
		"wikitext": "<ref name=\"blank\" />\n\n<ref name=\"blank\">content</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"blank\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"blank\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "content",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Regression: non-blank ref \"0\" followed by ref with content",
		"wikitext": "<ref name=\"blank\">0</ref>\n\n<ref name=\"blank\">content</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"blank\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "0",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"blank\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "content",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Regression sanity check: non-blank ref \"1\" followed by ref with content",
		"wikitext": "<ref name=\"blank\">1</ref>\n\n<ref name=\"blank\">content</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"blank\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "1",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"blank\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "content",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref names containing a number",
		"wikitext": "<ref name=\"test123test\">One</ref>\n<ref name=\"123test\">Two</ref>\n<ref name=\"test123\">Three</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"test123test\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "One",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"123test\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Two",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"test123\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Three",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T184912: Consistent normalization of consecutive underscores",
		"wikitext": "<ref name=\"test_123\">example</ref>\n<ref name=\"test__123\">example</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"test_123\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "example",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"test__123\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "example",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Erroneous refs",
		"wikitext": "<ref name=\"0\">Zero</ref>\n\n<ref>Also zero, but differently! (Normal ref)</ref>\n\n<ref />\n\n<ref name=\"foo\" name=\"bar\" />\n\n<ref name=\"blankwithnoreference\" />\n\n<references name=\"quasit\" />\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"0\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Zero",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Also zero, but differently! (Normal ref)",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"bar\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"blankwithnoreference\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"quasit\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Can't have name=\"…\" and follow=\"…\" the same time",
		"wikitext": "<ref name=\"theName\" follow=\"theFollows\">theValue</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theFollows\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theValue",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Conflicting name=\"…\" and follow=\"…\" together with another invalid parameter",
		"wikitext": "<ref name=\"theName\" follow=\"theFollows\" dummy=\"dummy\">theValue</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theFollows\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " dummy=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"dummy\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theValue",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "It's not possible to follow=\"…\" a <ref> defined in the <references> section",
		"wikitext": "<ref follow=\"theName\">theFollows</ref>\n<references>\n<ref name=\"theName\">theValue</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theFollows",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theValue",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "A follow=\"…\" before its parent is not merged",
		"wikitext": "<ref follow=\"theName\">''theFollows''</ref>\n<ref name=\"theName\">''theValue''</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "''",
				"name": "mw-tag-ref character"
			},
			{
				"text": "theFollows",
				"name": "mw-tag-ref mw-em"
			},
			{
				"text": "''",
				"name": "mw-tag-ref character"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "''",
				"name": "mw-tag-ref character"
			},
			{
				"text": "theValue",
				"name": "mw-tag-ref mw-em"
			},
			{
				"text": "''",
				"name": "mw-tag-ref character"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "\"follow\" after a named ref but before its parent",
		"wikitext": "<ref name=\"first\">First</ref>\n<ref follow=\"third\">Second</ref>\n<ref name=\"third\">Third</ref>\n<hr />\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"first\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "First",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"third\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Second",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"third\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Third",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "hr ",
				"name": "tagName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "\"follow\" after an anonymous ref but before its parent",
		"wikitext": "<ref>First</ref>\n<ref follow=\"third\">Second</ref>\n<ref name=\"third\">Third</ref>\n<hr />\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "First",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"third\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Second",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"third\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Third",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "hr ",
				"name": "tagName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T245549: Wikisource pages render follow=\"…\" without parent. This is normal and not an error.",
		"wikitext": "<ref follow=\"theName\">theFollows</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theFollows",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Valid follow=\"…\" after it's parent",
		"wikitext": "<ref name=\"theName\">theValue</ref>\n<ref follow=\"theName\">theFollows</ref>\n<ref>Should be 2</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theValue",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theFollows",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Should be 2",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Forward-referenced ref with follow",
		"wikitext": "<ref name=\"theName\" />\n<ref follow=\"theName\">theFollows</ref>\n<references>\n<ref name=\"theName\">theValue</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theFollows",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theValue",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Follow following a named ref with multiple definitions",
		"wikitext": "<ref name=\"test\">123</ref>\n<ref name=\"test\">234</ref>\n<ref follow=\"test\">345</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"test\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "123",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"test\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "234",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"test\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "345",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Multiple follow after refs without content and trailing ref with content in references section",
		"wikitext": "ADD<ref name=\"theName\" />\nSUB<ref name=\"theName\"></ref>\nMUL<ref follow=\"theName\">theFollowValue</ref>\nMOD<ref follow=\"theName\">anotherFollowValue</ref>\n<references>\n<ref name=\"theName\"> theValue</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": "></",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theFollowValue",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "anotherFollowValue",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": " theValue",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Report bad attributes in ref tags",
		"wikitext": "<ref name=\"theName\" group=\"theGroup\" dummy=\"dummy\">theValue</ref>\n<references group=\"theGroup\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theGroup\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " dummy=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"dummy\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theValue",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"theGroup\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Simple <ref>, with <references/> in group",
		"wikitext": "Wikipedia rocks!<ref>Proceeds of Rockology, vol. XXI</ref>\nWikipedia rocks!<ref group=\"note\">Proceeds of Rockology, vol. XXI</ref>\n\n<references />\n<references group=\"note\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Proceeds of Rockology, vol. XXI",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"note\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Proceeds of Rockology, vol. XXI",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"note\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Simple <ref>, with <references/> in group, with groupname in Chinese",
		"wikitext": "AAA<ref group=\"参\">ref a</ref>BBB<ref group=\"注\">note b</ref>CCC<ref group=\"参\">ref c</ref>\n\n;refs\n<references group=\"参\" />\n\n;notes\n<references group=\"注\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"参\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"注\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "note b",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"参\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref c",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "refs",
				"name": "mw-strong"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"参\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "notes",
				"name": "mw-strong"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"注\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Attributes are trimmed by the parser, see Sanitizer::decodeTagAttributes()",
		"wikitext": "<ref group=\"g\" name=\"n1\">in group g</ref>\n<ref group=\" g \" name=\" n2 \">in group \" g \"</ref>\n<references group=\"g\" />\n<references group=\" g \" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"g\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"n1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "in group g",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\" g \"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\" n2 \"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "in group \" g \"",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"g\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\" g \"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "<ref> defined in <references>",
		"wikitext": "<ref name=\"foo\" />\n\n<references>\n<ref name=\"foo\">BAR</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "BAR",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "<ref> defined in <references> called with #tag",
		"wikitext": "<ref name=\"foo\" />\n\n{{#tag:references|\n<Ref name=\"foo\">BAR</ref>\n}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "references",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Ref ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "BAR",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "T242437 - Nested references edge case, outer tag function with LDR",
		"wikitext": "<ref name=\"foo\" />\n{{#tag:references|\n  <ref name=\"foo\">bar</ref>\n\n  <References />\n}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "references",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "  ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "bar",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "  ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "References ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "T242437 - Nested references edge case, outer tag function, inner LDR",
		"wikitext": "<ref name=\"foo\" />\n{{#tag:references|\n  <references>\n    <ref name=\"foo\">bar</ref>\n  </references>\n}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "references",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "  ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-ext-ground mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": " ",
				"name": "mw-ext-ground mw-tag-references mw-skipformatting"
			},
			{
				"text": "   ",
				"name": "mw-ext-ground mw-tag-references"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-ext-ground mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-ext-ground mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-ext-ground mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "bar",
				"name": "mw-ext-ground mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": " ",
				"name": "mw-ext-ground mw-tag-references mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-ext-ground mw-tag-references"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-ext-ground mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "T242437 - Nested references edge case, inner tag function with LDR",
		"wikitext": "<ref name=\"foo\" />\n\n<references>\n  {{#tag:references|\n    <ref name=\"foo\">bar</ref>\n  }}\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": " ",
				"name": "mw-tag-references mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-tag-references"
			},
			{
				"text": "{{",
				"name": "mw-tag-references mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-tag-references mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-tag-references mw-ext-ground punctuation"
			},
			{
				"text": "references",
				"name": "mw-tag-references mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-tag-references mw-ext-ground punctuation"
			},
			{
				"text": "    ",
				"name": "mw-tag-references mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-tag-references mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "bar",
				"name": "mw-tag-references mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "  ",
				"name": "mw-tag-references mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-tag-references mw-ext-ground paren"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "<ref> defined in <references> error conditions",
		"wikitext": "<ref name=\"foo\" group=\"2\" />\n\n<references group=\"2\">\n<ref name=\"foo\" />\n<ref name=\"unused\">BAR</ref>\n<ref name=\"foo\" group=\"1\">bad group</ref>\n<ref name=\"bar\" group=\"1\" />\n<ref>BAR BAR</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"2\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"2\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"unused\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "BAR",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": " group=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"1\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "bad group",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"bar\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": " group=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"1\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "BAR BAR",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "<ref> ungrouped and grouped refs with and without content defined",
		"wikitext": "ONE<ref name=\"foo\" />\n<references />\nTWO<ref group=\"NOTES\" name=\"foo\" />\nTHREE<ref group=\"NOTES\" name=\"bar\">CONTENT</ref>\n<references group=\"NOTES\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"NOTES\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"NOTES\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"bar\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "CONTENT",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"NOTES\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Error conditions on non-visible content",
		"wikitext": "<ref name=\"a\">x</ref>\n<ref name=\"b\"> </ref>\n<ref name=\"c\" />\n<references>\n<ref name=\"a\" />\n<ref name=\"b\" />\n<ref name=\"c\"> </ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "x",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": " ",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"c\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"c\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": " ",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "<ref> with custom group link with number names in Klingon",
		"wikitext": "Wikipedia rocks!<ref group=\"klingon\">Proceeds of Rockology, vol. XXI</ref>\n\n<references group=\"klingon\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"klingon\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Proceeds of Rockology, vol. XXI",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"klingon\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Consecutive whitespace in custom link label message should not create empty []",
		"wikitext": "<ref group=\"klingon\">1st</ref>\n<ref group=\"klingon\">2nd</ref>\n<references group=\"klingon\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"klingon\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "1st",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"klingon\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "2nd",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"klingon\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Bug 31374 regression check: nested strip items",
		"wikitext": "{{#tag:ref|note<ref>reference</ref>|group=Note}}\n<references group=\"Note\" />\n<references />",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "note",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "reference",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "group=Note",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"Note\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Bug 13073 regression check: wrapped <references>",
		"wikitext": "<ref>\nfoo\n</ref>\n<div><references /></div>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "<ref> with no name and no content.",
		"wikitext": "Bla.<ref></ref>\nfoo.<ref />\nzero{{1x|<ref />}}\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "></",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-template-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "<ref> with an empty-string name parameter and no content.",
		"wikitext": "Bla.<ref name=\"\"> </ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": " ",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "<ref> with whitespace only name parameter and no content.",
		"wikitext": "Hi <ref name=\" \"> </ref>\nHo <ref name=\" \" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\" \"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": " ",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\" \"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "<ref> with a non-empty name parameter and no content.",
		"wikitext": "Bla.<ref name=\"void\"> </ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"void\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": " ",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Whitespace only doesn't set content for named ref",
		"wikitext": "Hi <ref name=\"ho\"> </ref>\nHi <ref name=\"ho\">Off to work we go!</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"ho\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": " ",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"ho\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Off to work we go!",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Multiple definition (outside <references/>)",
		"wikitext": "<ref name=\"a\">abc</ref>\n<ref name=\"a\">def</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "abc",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "def",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Multiple definition (inside <references/>)",
		"wikitext": "<ref name=\"a\" />\n<references>\n<ref name=\"a\">abc</ref>\n<ref name=\"a\">def</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "abc",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "def",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Multiple definition (mixed outside/inside)",
		"wikitext": "<ref name=\"a\">abc</ref>\n<references>\n<ref name=\"a\">def</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "abc",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "def",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T202593: Conflicting dir attributes",
		"wikitext": "<ref name=\"a\" dir=\"ltr\" />\n<ref name=\"a\" dir=\"rtl\">abc</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " dir=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"ltr\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " dir=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"rtl\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "abc",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T202593: Conflicting dir attributes with the full ref first",
		"wikitext": "<ref name=\"a\" dir=\"ltr\">abc</ref>\n<ref name=\"a\" dir=\"rtl\" />\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " dir=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"ltr\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "abc",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " dir=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"rtl\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T202593: Identical dir attributes are pointless, but should not generate an error",
		"wikitext": "<ref name=\"a\" dir=\"RTL\" />\n<ref name=\"a\" dir=\"rtl\">abc</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " dir=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"RTL\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " dir=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"rtl\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "abc",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Multiple definition (inside {{#tag:references}})",
		"wikitext": "<ref name=\"a\" />\n{{#tag:references|\n<ref name=\"a\">abc</ref>\n<ref name=\"a\">def</ref>\n}}\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "references",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "abc",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "def",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T29694 - [] in reference names in HTML5 fragment mode",
		"wikitext": "<ref name=\"[#foo] {bar} <baz>\">[bar]</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"[#foo] {bar} <baz",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "\">[bar]",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "T29694 - [] in reference names in HTML5 fragment mode (tidied)",
		"wikitext": "<ref name=\"[#foo] {bar} <baz&gt;\">[bar]</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"[#foo] {bar} <baz&gt;\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "[bar]",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 1. ref-location should be replaced with an index span",
		"wikitext": "A <ref>foo</ref>\nB <ref name=\"x\">foo</ref>\nC <ref name=\"y\" />\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"x\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"y\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 2. ref-tags with identical names should all get the same index",
		"wikitext": "A <ref name=\"x\">foo</ref>\nB <ref name=\"x\" />\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"x\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"x\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 3. spaces in ref-names should be ignored",
		"wikitext": "A <ref name=\"x\">foo</ref>\nB <ref name=\" x \" />\nC <ref name= x  />\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"x\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\" x \"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name= ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "x",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": "  ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 4. 'constructor' should be accepted as a valid ref-name",
		"wikitext": "A <ref name=\"constructor\">foo</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"constructor\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 5. body should accept generic wikitext",
		"wikitext": "A <ref>\n This is a '''[[bolded link]]''' and this is a {{1x|transclusion}}\n</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": " ",
				"name": "mw-tag-ref mw-skipformatting"
			},
			{
				"text": "This is a ",
				"name": "mw-tag-ref"
			},
			{
				"text": "'''",
				"name": "mw-tag-ref character"
			},
			{
				"text": "[[",
				"name": "mw-tag-ref mw-link-ground squareBracket"
			},
			{
				"text": "bolded link",
				"name": "mw-tag-ref mw-link-ground mw-link-pagename mw-pagename mw-strong"
			},
			{
				"text": "]]",
				"name": "mw-tag-ref mw-link-ground squareBracket"
			},
			{
				"text": "'''",
				"name": "mw-tag-ref character"
			},
			{
				"text": " and this is a ",
				"name": "mw-tag-ref"
			},
			{
				"text": "{{",
				"name": "mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-tag-ref mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-tag-ref mw-template-ground separator"
			},
			{
				"text": "transclusion",
				"name": "mw-tag-ref mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 6. indent-pres should not be output in ref-body",
		"wikitext": "A <ref>\n foo\n bar\n baz\n</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": " ",
				"name": "mw-tag-ref mw-skipformatting"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": " ",
				"name": "mw-tag-ref mw-skipformatting"
			},
			{
				"text": "bar",
				"name": "mw-tag-ref"
			},
			{
				"text": " ",
				"name": "mw-tag-ref mw-skipformatting"
			},
			{
				"text": "baz",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 7. No p-wrapping in ref-body",
		"wikitext": "A <ref>\nfoo\n\nbar\n\n\nbaz\n\n\n\nbooz\n</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "bar",
				"name": "mw-tag-ref"
			},
			{
				"text": "baz",
				"name": "mw-tag-ref"
			},
			{
				"text": "booz",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 8. transclusion wikitext has lower precedence",
		"wikitext": "A <ref> foo {{1x|</ref> B C}}\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": " foo ",
				"name": "mw-tag-ref"
			},
			{
				"text": "{{",
				"name": "mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-tag-ref mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-tag-ref mw-template-ground separator"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 9. unclosed comments should not leak out of ref-body",
		"wikitext": "A <ref> foo <!--</ref> B C\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": " foo ",
				"name": "mw-tag-ref"
			},
			{
				"text": "<!--",
				"name": "mw-tag-ref comment"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 10. Unclosed HTML tags should not leak out of ref-body",
		"wikitext": "A <ref> <b> foo </ref> B C\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": " ",
				"name": "mw-tag-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "b",
				"name": "mw-tag-ref tagName"
			},
			{
				"text": ">",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": " foo ",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 11. ref-tags acts like an inline element wrt P-wrapping",
		"wikitext": "A <ref>foo</ref> B\nC <ref>bar</ref> D\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "bar",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 12. ref-tags act as trailing newline migration barrier",
		"wikitext": "<!--the newline at the end of this line moves out of the p tag-->a\n\nb<!--the newline at the end of this line stays inside the p tag--> <ref>foo</ref>\n<ref>bar</ref>\n\nc\n<references />",
		"nodes": [
			{
				"text": "<!--the newline at the end of this line moves out of the p tag-->",
				"name": "comment"
			},
			{
				"text": "<!--the newline at the end of this line stays inside the p tag-->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "bar",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 13. ref-tags are not SOL-transparent and block indent-pres",
		"wikitext": "<ref>foo</ref> A\n<ref>bar\n</ref> B\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "bar",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 14. A nested ref-tag should be emitted as plain text",
		"wikitext": "<ref>foo <ref>bar</ref> baz</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo ",
				"name": "mw-tag-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-ref mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-ref mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-ref mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "bar",
				"name": "mw-tag-ref mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</ref",
				"name": "mw-error"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 15. ref-tags with identical names should get identical indexes",
		"wikitext": "A1 <ref name=\"a\">foo</ref> A2 <ref name=\"a\" />\nB1 <ref name=\"b\" /> B2 <ref name=\"b\">bar</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "bar",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags",
		"wikitext": "A <ref >foo</ref >\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 17. Generate valid HTML5 id/about attributes",
		"wikitext": "<ref name=\"a b\">foo</ref>\n<ref name=\":0\">ve-created name</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\":0\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ve-created name",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 18. T58916: Extension attributes should be parsed as plain text",
		"wikitext": "<ref name=\"{{1x|a}}\">foo</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"{{1x|a}}\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 19. ref-tags with identical name encodings should get identical indexes",
		"wikitext": "1 <ref name=\"a & b\">foo</ref> 2 <ref name=\"a &amp; b\" />\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a & b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a &amp; b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref: 20. ref-tags with identical names but different content should keep it",
		"wikitext": "A <ref name=\"foo\">Foo one</ref>\nB <ref name=\"foo\">Foo two</ref>\nC <ref name=\"foo\" />\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Foo one",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Foo two",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Verify invalid use of a numeric character in a ref name",
		"wikitext": "PRE <ref>preValue</ref>\nTHEVALUE <ref name=\"1\">theValue</ref>\nPOST <ref>postValue</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "preValue",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theValue",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "postValue",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Verify invalid use of a numeric character in a ref name and follow",
		"wikitext": "<ref name=\"1\">theValue</ref>\n<ref follow=\"1\">theFollow</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theValue",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theFollow",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "References: 1a. references tag without any refs should be handled properly",
		"wikitext": "<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "References: 1b. references tag without any refs should be handled properly",
		"wikitext": "<references></references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "></",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "References: 2. references tag with group only outputs references from that group",
		"wikitext": "A <ref group=\"a\">foo</ref>\nB <ref group=\"b\">bar</ref>\nC <ref>baz</ref>\n\n<references group=\"a\" />\n<references />\n<references group=\"b\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "bar",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "baz",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "References: 3. ref list should be cleared after processing references",
		"wikitext": "A <ref>foo</ref>\n\n<references />\n\nB <ref>bar</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "bar",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Counters should be cleared after processing named <references group=\"…\">",
		"wikitext": "A <ref group=\"g\">foo</ref>\n\n<references group=\"g\" />\n\nB <ref group=\"g\">bar</ref>\n\n<references group=\"g\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"g\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"g\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"g\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "bar",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"g\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "References: 4. only referenced group should be cleared after processing references",
		"wikitext": "A <ref group=\"a\">afoo</ref>\nB <ref>bfoo</ref>\n\n<references group=\"a\" />\n\nC <ref>cfoo</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "afoo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "bfoo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "cfoo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "References: 5. ref tags in references should be processed while ignoring all other content",
		"wikitext": "A <ref name=\"a\" />\nB <ref name=\"b\">bar</ref>\n\n<references>\n<ref name=\"a\">foo</ref>\nThis should just get lost.\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "bar",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "This should just get lost.",
				"name": "mw-tag-references"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "References: 6. <references> with nested refs from a transclusion",
		"wikitext": "<ref name=\"bar\" />\n{{1x|<references><ref name=\"bar\">Foo</ref></references>}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"bar\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-template-ground mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-template-ground mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-template-ground mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"bar\"",
				"name": "mw-template-ground mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Foo",
				"name": "mw-template-ground mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-ground mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-template-ground mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "References: 6.1. T399937 <references> with nested refs from a transclusion wrapped in a div",
		"wikitext": "<ref name=\"bar\" />\n{{1x|1=<div class=\"usr1\"><references><ref name=\"bar\">Foo</ref></references></div>}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"bar\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div ",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "class=",
				"name": "mw-template-ground attributeName"
			},
			{
				"text": "\"usr1\"",
				"name": "mw-template-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-template-ground mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-template-ground mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-template-ground mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"bar\"",
				"name": "mw-template-ground mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Foo",
				"name": "mw-template-ground mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-ground mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-template-ground mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "References: 6.2. T399937 <references> with nested refs from a transclusion wrapped in a div preceded by another div",
		"wikitext": "<ref name=\"bar\" />\n{{1x|1=<div class=\"usr0\"/><div class=\"usr1\"><references><ref name=\"bar\">Foo</ref></references></div>}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"bar\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div ",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "class=",
				"name": "mw-template-ground attributeName"
			},
			{
				"text": "\"usr0\"",
				"name": "mw-template-ground mw-htmltag-attribute-value"
			},
			{
				"text": "/><",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div ",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "class=",
				"name": "mw-template-ground attributeName"
			},
			{
				"text": "\"usr1\"",
				"name": "mw-template-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-template-ground mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-template-ground mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-template-ground mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"bar\"",
				"name": "mw-template-ground mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Foo",
				"name": "mw-template-ground mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-ground mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-template-ground mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled",
		"wikitext": "A <ref>foo bar for a</ref>\nB <ref group=\"X\" name=\"b\" />\n\n<references />\n\n<references group=\"X\">\n<ref name=\"b\">foo</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo bar for a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"X\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"X\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "References: 7b. Multiple references tags some with errors should be correctly handled",
		"wikitext": "ALPHA<ref name=\"foo\" />\nBETA<ref name=\"foo\" />\nONE<ref group=\"NOTES\" name=\"foo\" />\nTWO<ref group=\"NOTES\" name=\"foo\">food</ref>\n<references group=\"NOTES\" />\n<references />\nTHREE<ref group=\"NOTES\" name=\"bar\">CONTENT</ref>\nFOUR<ref group=\"NOTES\" name=\"foo\" />\nFIVE<ref group=\"NOTES\" name=\"foo\" />\nSIX<ref name=\"foo\" />\n<references group=\"NOTES\" />\n<references>\n<ref name=\"foo\">NOGROUPCONTENT</ref>\n</references>\nSEVEN<ref group=\"NOTES\" name=\"bar\" />\nEIGHT<ref group=\"NOTES\" name=\"foo\" />\n<references group=\"NOTES\" />\nNINE<ref group=\"NOTES\" name=\"bar\">NINECONTENT</ref>\nTEN<ref group=\"NOTES\" name=\"foo\">TENCONTENT</ref>\n<references group=\"NOTES\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"NOTES\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"NOTES\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "food",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"NOTES\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"NOTES\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"bar\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "CONTENT",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"NOTES\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"NOTES\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"NOTES\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "NOGROUPCONTENT",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"NOTES\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"bar\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"NOTES\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"NOTES\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"NOTES\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"bar\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "NINECONTENT",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"NOTES\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "TENCONTENT",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"NOTES\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template",
		"wikitext": "X{{1x|<ref>foo {{1x|<b>bar</b>}} and {{1x|baz}} boo</ref>}}\n<references />",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo ",
				"name": "mw-template-ground mw-tag-ref"
			},
			{
				"text": "{{",
				"name": "mw-template-ground mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground mw-tag-ref mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground mw-tag-ref mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-tag-ref mw-template-ground angleBracket"
			},
			{
				"text": "b",
				"name": "mw-template-ground mw-tag-ref mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-tag-ref mw-template-ground angleBracket"
			},
			{
				"text": "bar",
				"name": "mw-template-ground mw-tag-ref mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-tag-ref mw-template-ground angleBracket"
			},
			{
				"text": "b",
				"name": "mw-template-ground mw-tag-ref mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-tag-ref mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": " and ",
				"name": "mw-template-ground mw-tag-ref"
			},
			{
				"text": "{{",
				"name": "mw-template-ground mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground mw-tag-ref mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground mw-tag-ref mw-template-ground separator"
			},
			{
				"text": "baz",
				"name": "mw-template-ground mw-tag-ref mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": " boo",
				"name": "mw-template-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "References: 9. Generate missing references list at the end",
		"wikitext": "A <ref>foo</ref>\nB <ref group=\"inexistent\">bar</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"inexistent\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "bar",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "References: 10.1. New <references/> shouldn't be added for unrelated edits.",
		"wikitext": "Unrelated text<span id=\"x\"> that's going to disappear</span>.\nA <ref>foo</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"x\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "References: 10.2. New <references/> shouldn't be added for unrelated edits.",
		"wikitext": "Unrelated text<span id=\"x\"> that's going to disappear</span>.\nA <ref>foo</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"x\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Grouped references with follow rendered in mixed order",
		"wikitext": "AA<ref group=\"a\" name=\"name_a\">group_a_name_a</ref>\nBA<ref group=\"b\" name=\"name_a\">group_b_name_a</ref>\nCA<ref group=\"c\" name=\"name_a\">group_c_name_a</ref>\nBB<ref group=\"b\" name=\"name_b\">group_b_name_b</ref>\nFBA<ref group=\"b\" follow=\"name_a\">group_b_follow_a</ref>\nFAA<ref group=\"a\" follow=\"name_a\">group_a_follow_a</ref>\nFBB<ref group=\"b\" follow=\"name_b\">group_b_follow_b</ref>\nFCA<ref group=\"c\" follow=\"name_a\">group_c_follow_a</ref>\n<references group=\"b\" />\n<references group=\"c\" />\n<references group=\"a\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"name_a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "group_a_name_a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"name_a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "group_b_name_a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"c\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"name_a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "group_c_name_a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"name_b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "group_b_name_b",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"name_a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "group_b_follow_a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"name_a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "group_a_follow_a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"name_b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "group_b_follow_b",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"c\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"name_a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "group_c_follow_a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"c\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Grouped references with automatic group references generating errors",
		"wikitext": "GROUP <ref group=\"theGroup\" name=\"theName\">theValue</ref>\nGROUP3 <ref group=\"theGroup3\" name=\"theName3\">theValue3</ref>\nGROUP2 <ref group=\"theGroup2\" name=\"theName2\">theValue2</ref>\naDifferentNameGROUP3 <ref group=\"theGroup3\" name=\"theName\">anotherValue3differentName</ref>\naDifferentNameGROUP2 <ref group=\"theGroup2\" name=\"anotherName2\">anotherValue2DifferentName</ref>\nanotherGROUP3 <ref group=\"theGroup3\" name=\"theName3\">anotherValue3</ref>\naDifferentNameGROUP <ref group=\"theGroup\" name=\"anotherName2\">anotherValueDifferentName</ref>\n<references group=\"theGroup3\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theGroup\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theValue",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theGroup3\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName3\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theValue3",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theGroup2\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName2\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theValue2",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theGroup3\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "anotherValue3differentName",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theGroup2\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"anotherName2\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "anotherValue2DifferentName",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theGroup3\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName3\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "anotherValue3",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theGroup\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"anotherName2\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "anotherValueDifferentName",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"theGroup3\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Entities in ref name",
		"wikitext": "<ref name=\"test &amp; me {{1x|foo}}\">hi</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"test &amp; me {{1x|foo}}\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "hi",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Generate references for unclosed references tag",
		"wikitext": "a<ref>foo</ref>\n\n<references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "New reference serializes on its own line",
		"wikitext": "foo\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref in ref: nested in top level ref",
		"wikitext": "test <ref>hi {{refinref|ho}}</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "hi ",
				"name": "mw-tag-ref"
			},
			{
				"text": "{{",
				"name": "mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "refinref",
				"name": "mw-tag-ref mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-tag-ref mw-template-ground separator"
			},
			{
				"text": "ho",
				"name": "mw-tag-ref mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref in ref: top level ref nested in transclusion",
		"wikitext": "test {{refinref|456<ref>123</ref>}}\n<references />",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "refinref",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "456",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "123",
				"name": "mw-template-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref in ref: top level ref nested in parser function",
		"wikitext": "test {{#tag:ref|456<ref>123</ref>}}\n<references />",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "456",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "123",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref in ref: Multiple levels of nesting in parser function",
		"wikitext": "one{{#tag:ref|two{{#tag:ref|three<ref>four</ref>}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "two",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": "ref",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": "three",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext2-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext2-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext2-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "four",
				"name": "mw-ext2-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext2-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext2-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext2-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "1. Ref in ref: self-referential",
		"wikitext": "{{#tag:ref|<div><ref name=\"x\" /></div>|name=x}}\n\n<references />",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"x\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "name=x",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "2. Ref in ref: self-referential, redefinition",
		"wikitext": "{{#tag:ref|<div><ref name=\"x\">y</ref></div>|name=\"x\"}}\n\n<references />",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"x\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "y",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "name=\"x\"",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "3. Ref in ref: self-referential, redefinition and leading, with other ref",
		"wikitext": "<ref name=\"x\" />\n\n{{#tag:ref|<div><ref name=\"x\">y</ref><ref name=\"z\">z</ref></div>|name=\"x\"}}\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"x\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"x\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "y",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "><",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"z\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "z",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "name=\"x\"",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Reference list-defined nested <ref>s (T349981)",
		"wikitext": "<ref name=\"foo\" group=\"1\" />{{#tag:references|{{#tag:ref|foo<ref>bar</ref>|name=foo|group=1}}|group=1}}\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "references",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": "ref",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": "foo",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext2-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext2-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext2-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "bar",
				"name": "mw-ext2-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext2-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext2-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext2-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "|",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": "name=foo",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": "group=1",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "group=1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Nested ref with forward slash",
		"wikitext": "test {{nestedrefslash}}\n<references />",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "nestedrefslash",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Responsive references: disabled, autogenerated",
		"wikitext": "Test <ref>1</ref><ref>2</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "1",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "><",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "2",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Responsive references: enabled, autogenerated",
		"wikitext": "Test <ref>1</ref><ref>2</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "1",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "><",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "2",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Responsive references: enabled, autogenerated, exceed",
		"wikitext": "Test <ref>1</ref><ref>2</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "1",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "><",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "2",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Responsive references: disabled",
		"wikitext": "Test <ref>1</ref><ref>2</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "1",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "><",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "2",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Responsive references: enabled",
		"wikitext": "Test <ref>1</ref><ref>2</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "1",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "><",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "2",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Responsive references: enabled, exceed",
		"wikitext": "Test <ref>1</ref><ref>2</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "1",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "><",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "2",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Responsive references: disabled, explicit",
		"wikitext": "Test <ref>1</ref><ref>2</ref>\n<references responsive=\"\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "1",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "><",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "2",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "responsive=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Responsive references: disabled, explicit, exceed",
		"wikitext": "Test <ref>1</ref><ref>2</ref>\n<references responsive=\"\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "1",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "><",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "2",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "responsive=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Responsive references: enabled, explicit off",
		"wikitext": "Test <ref>1</ref><ref>2</ref>\n<references responsive=\"0\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "1",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "><",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "2",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "responsive=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"0\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Responsive references: roundtrip templates",
		"wikitext": "test <ref>123</ref>\n\n{{1x|haha<references/>}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "123",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "haha",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-template-ground mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "CircularRef",
		"wikitext": "<ref>Hi {{CircularRef}}</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Hi ",
				"name": "mw-tag-ref"
			},
			{
				"text": "{{",
				"name": "mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "CircularRef",
				"name": "mw-tag-ref mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T15673: <ref> with direction \"rtl\"",
		"wikitext": "<ref dir=\"rtl\">TEST</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "dir=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"rtl\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "TEST",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T15673: <ref> with direction \"ltr\"",
		"wikitext": "<ref dir=\"ltr\">TEST</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "dir=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"ltr\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "TEST",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T15673: <ref> with direction \"LTR\", keeps upper case",
		"wikitext": "<ref dir=\"LTR\">TEST</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "dir=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"LTR\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "TEST",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T15673: <ref> with direction \"nonsense\" and \"\" (empty), strip invalid dir attribute and shows error",
		"wikitext": "<ref dir=\"nonsense\">NONSENSE_DIR_TEST</ref>\n<ref dir=\"\">EMPTY_DIR_TEST</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "dir=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"nonsense\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "NONSENSE_DIR_TEST",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "dir=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "EMPTY_DIR_TEST",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T15673: Direction is supported when specifying name and group",
		"wikitext": "<ref dir=\"ltr\" name=\"a\" group=\"note\">TEST</ref>\n\n<references group=\"note\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "dir=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"ltr\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"note\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "TEST",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"note\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Ref with block content in formatting tag",
		"wikitext": "''hi<ref><div>ho</div></ref>''\n<references />",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "hi",
				"name": "mw-em"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "div",
				"name": "mw-tag-ref tagName"
			},
			{
				"text": ">",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "ho",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "div",
				"name": "mw-tag-ref tagName"
			},
			{
				"text": ">",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T196827: Use the dir parameter only from the full definition of a named ref tag",
		"wikitext": "abc<ref name=\"r1\" />def\n\nghi<ref name=\"r1\" dir=\"rtl\">jkl</ref>mno\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"r1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"r1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " dir=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"rtl\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "jkl",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T196827: Ignore the dir parameter from the first use, which is not a full definition, and use the dir value from the full definition of a named ref tag",
		"wikitext": "abc<ref name=\"r1\" dir=\"rtl\" />def\n\nghi<ref name=\"r1\">jkl</ref>mno\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"r1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " dir=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"rtl\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"r1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "jkl",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Similarly named refs with identical bodies",
		"wikitext": "1 <ref name=\"one\">1</ref> 2 <ref name=\"one\">1</ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"one\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "1",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"one\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "1",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T220196 - Reference names with high-bit characters, html5 mode",
		"wikitext": "<ref name=\"füllen\">[bar]</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"füllen\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "[bar]",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T220196 - Reference names with high-bit characters, legacy mode",
		"wikitext": "<ref name=\"füllen\">[bar]</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"füllen\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "[bar]",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Transclusion parameter spacing is lost without data-parsoid",
		"wikitext": "<ref>{{1x|\nHi ho\n}}</ref>\n\n<!-- Traverse with an encapsulation where the root isn't a native extension -->\n{{1x|<div><references /></div>}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-tag-ref mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-tag-ref mw-template-ground separator"
			},
			{
				"text": "Hi ho",
				"name": "mw-tag-ref mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<!-- Traverse with an encapsulation where the root isn't a native extension -->",
				"name": "comment"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-template-ground mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T269531: Generic error message when a list-defined reference is not used in the text",
		"wikitext": "<references>\n<ref name=\"foo\">foo</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T269531: Special case when a named group is entirely unused in the text",
		"wikitext": "<references group=\"g\">\n<ref name=\"a\" group=\"g\">a</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"g\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": " group=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"g\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T242437 - Blank ref name in #tag regression",
		"wikitext": "{{#tag:references|\n<ref name=\"\">foo</ref>\n}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "references",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "T48140 - Make sure rollback/redo does not consume numbers",
		"wikitext": "<ref>should be [1]</ref>\n<ref name=\"a\" group=\"g\" />\n{{#tag:references|\n<ref name=\"a\">a</ref>\n|group=g}}\n<ref>should be [2]</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "should be [1]",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"g\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "references",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "group=g",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "should be [2]",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Numbers in the default group need to start with 1, independent from other groups",
		"wikitext": "<ref name=\"a\" group=\"g\" />\n{{#tag:references|\n<ref name=\"a\">a</ref>\n|group=g}}\n<ref name=\"c\">c</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"g\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "references",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "group=g",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"c\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "c",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Serialize reference tags by themselves on a line",
		"wikitext": "hi <ref>ho</ref>\n<references />\nhi ho",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ho",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T93580: 1. Templated <ref> inside block images",
		"wikitext": "[[File:Foobar.jpg|thumb|Caption with templated ref: {{1x|<ref>foo</ref>}}]]\n\n<references />",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Caption with templated ref: ",
				"name": "mw-link-ground string"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-link-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-template-link-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-template-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-link-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T93580: 2. <ref> inside inline images",
		"wikitext": "[[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]\n\n<references />",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Undisplayed caption in inline image with ref: ",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-link-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-link-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-link-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T93580: 3. Templated <ref> inside inline images",
		"wikitext": "[[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{1x|<ref>{{1x|foo}}</ref>}}]]\n\n<references />",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Undisplayed caption in inline image with ref: ",
				"name": "mw-link-ground string"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-link-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground mw-tag-ref mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground mw-tag-ref mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-link-ground mw-tag-ref mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "mw-template-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-link-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Report bad attributes in reference tags",
		"wikitext": "<ref>noGroupOrNameValue</ref>\n<references badattrib=\"invalidAttribute\" />\n<ref name=\"theName\">theNameValue</ref>\n<references name=\"theName\" badattrib=\"invalidNameAttribute\" />\n<ref group=\"theGroup\">theGroupValue</ref>\n<references group=\"theGroup\" badattrib=\"invalidGroupAttribute\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "noGroupOrNameValue",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "badattrib=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"invalidAttribute\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theNameValue",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"theName\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " badattrib=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"invalidNameAttribute\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"theGroup\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "theGroupValue",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"theGroup\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " badattrib=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"invalidGroupAttribute\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Check Cite handing of different types of whitespace in reference names",
		"wikitext": "test space<ref name=\"a b\">testSpaceRef</ref>\nblah space<ref name=\"a b\" />\n\ntest underbar<ref name=\"a_b\">testUnderbarRef</ref>\nblah underbar<ref name=\"a_b\" />\n\ntest unicode u2028 whitespace<ref name=\"ab\">testUnicodeWhitespaceRef</ref>\nblah unicode u2028 whitespace<ref name=\"ab\" />\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "testSpaceRef",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a_b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "testUnderbarRef",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a_b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"ab\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "testUnicodeWhitespaceRef",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"ab\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Check Cite handing of linefeed whitespace in reference names",
		"wikitext": "test linefeed<ref name=\"a\nb\">testLinefeedRef</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": "b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "testLinefeedRef",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "<ref> in a link should hoist the link outside the link (T301293)",
		"wikitext": "[[Foo|''x<ref>y</ref>z'']]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "x",
				"name": "mw-link-ground string mw-em"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-link-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "y",
				"name": "mw-link-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-link-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "z",
				"name": "mw-link-ground string mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Hoisting a reference should not break template continuity",
		"wikitext": "{{1x|hello [[Foo|''x<ref>y</ref>z'']] world}}\n<references />",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "hello ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground operator"
			},
			{
				"text": "''",
				"name": "mw-template-link-ground string character"
			},
			{
				"text": "x",
				"name": "mw-template-link-ground string mw-em"
			},
			{
				"text": "<",
				"name": "mw-template-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-link-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "y",
				"name": "mw-template-link-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-template-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-link-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "z",
				"name": "mw-template-link-ground string mw-em"
			},
			{
				"text": "''",
				"name": "mw-template-link-ground string character"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": " world",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Hoisting multiple references should keep references in order",
		"wikitext": "[[Foo|hello <ref>note 1</ref><ref>note 2</ref>]]<ref>note 3</ref>\n<references />",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "hello ",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-link-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "note 1",
				"name": "mw-link-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-link-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "><",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-link-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "note 2",
				"name": "mw-link-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-link-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "note 3",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Red links in templated references",
		"wikitext": "<ref>[[Not_existing_article]]</ref>\n\n{{1x|<references />}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "[[",
				"name": "mw-tag-ref mw-link-ground squareBracket"
			},
			{
				"text": "Not_existing_article",
				"name": "mw-tag-ref mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-tag-ref mw-link-ground squareBracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-template-ground mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Broken wikitext making a ref as extended attribute and a duplicated fragment",
		"wikitext": "<i <ref>y</ref>>\n\nz\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "i ",
				"name": "tagName"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "y",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Broken wikitext making a ref as extended attribute and a duplicated fragment (with 2wt tests)",
		"wikitext": "<i title=\"<ref>y</ref>\">a\n\nz\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "i ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "y",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered",
		"wikitext": "{{PartialTable}}\n<ref>foo</ref>\n|-\n|x\n|}\n\n<references />",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "PartialTable",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Template nested in extension tag in template",
		"wikitext": "{{1x|hi<ref>[[ho|{{1x|hi}}]]</ref>}}\n{{1x|hi<ref>[http://test.com?q={{1x|ho}}]</ref>}}\n{{1x|hi<ref>-{ho|{{1x|hi}}}-</ref>}}\n<references />",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "hi",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "[[",
				"name": "mw-template-ground mw-tag-ref mw-link-ground squareBracket"
			},
			{
				"text": "ho",
				"name": "mw-template-ground mw-tag-ref mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-template-ground mw-tag-ref mw-link-ground operator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground mw-tag-ref mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground mw-tag-ref mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground mw-tag-ref mw-template-link-ground separator"
			},
			{
				"text": "hi",
				"name": "mw-template-ground mw-tag-ref mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground mw-tag-ref mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-template-ground mw-tag-ref mw-link-ground squareBracket"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "hi",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "[",
				"name": "mw-template-ground mw-tag-ref mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-template-ground mw-tag-ref mw-link-ground namespace"
			},
			{
				"text": "test.com?q=",
				"name": "mw-template-ground mw-tag-ref mw-link-ground url"
			},
			{
				"text": "{{",
				"name": "mw-template-ground mw-tag-ref mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground mw-tag-ref mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground mw-tag-ref mw-template-link-ground separator"
			},
			{
				"text": "ho",
				"name": "mw-template-ground mw-tag-ref mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground mw-tag-ref mw-template-link-ground bracket"
			},
			{
				"text": "]",
				"name": "mw-template-ground mw-tag-ref mw-link-ground modifier"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "hi",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "-{",
				"name": "mw-template-ground mw-tag-ref mw-conversion-bracket"
			},
			{
				"text": "ho",
				"name": "mw-template-ground mw-tag-ref mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-template-ground mw-tag-ref mw-conversion-delimiter"
			},
			{
				"text": "{{",
				"name": "mw-template-ground mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground mw-tag-ref mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground mw-tag-ref mw-template-ground separator"
			},
			{
				"text": "hi",
				"name": "mw-template-ground mw-tag-ref mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "}-",
				"name": "mw-template-ground mw-tag-ref mw-conversion-bracket"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Headings: Category in ref isn't hoisted",
		"wikitext": "== foo <ref>bar\n[[Category:Baz]] </ref> ==\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "bar",
				"name": "mw-tag-ref"
			},
			{
				"text": "[[",
				"name": "mw-tag-ref mw-link-ground squareBracket"
			},
			{
				"text": "Category:Baz",
				"name": "mw-tag-ref mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-tag-ref mw-link-ground squareBracket"
			},
			{
				"text": " ",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Testing serialization after deletion in references",
		"wikitext": "hi <ref><div id=\"x\">ho</div></ref>\n\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "div ",
				"name": "mw-tag-ref tagName"
			},
			{
				"text": "id=",
				"name": "mw-tag-ref attributeName"
			},
			{
				"text": "\"x\"",
				"name": "mw-tag-ref mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "ho",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "div",
				"name": "mw-tag-ref tagName"
			},
			{
				"text": ">",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Catch regression when unpacking with trailing content",
		"wikitext": "{{1x|Foo <references/> bar}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Foo ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-template-ground mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-references"
			},
			{
				"text": " bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "1. DOMDiff: Changes to <ref> content should be looked up using id",
		"wikitext": "X <ref><span id=\"X\">foo</span></ref>\nY <ref name=\"a\" />\n<references>\n<ref name=\"a\"><span id=\"Y\">foo</span></ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "span ",
				"name": "mw-tag-ref tagName"
			},
			{
				"text": "id=",
				"name": "mw-tag-ref attributeName"
			},
			{
				"text": "\"X\"",
				"name": "mw-tag-ref mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "span",
				"name": "mw-tag-ref tagName"
			},
			{
				"text": ">",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-tag-ref angleBracket"
			},
			{
				"text": "span ",
				"name": "mw-tag-references mw-tag-ref tagName"
			},
			{
				"text": "id=",
				"name": "mw-tag-references mw-tag-ref attributeName"
			},
			{
				"text": "\"Y\"",
				"name": "mw-tag-references mw-tag-ref mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-tag-ref angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-tag-ref angleBracket"
			},
			{
				"text": "span",
				"name": "mw-tag-references mw-tag-ref tagName"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-tag-ref angleBracket"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "2. DOMDiff: Changes to <ref> content should be looked up using id",
		"wikitext": "A <ref>foo bar for a</ref>\nB <ref group=\"X\" name=\"b\" />\n\n<references />\n\n<references group=\"X\">\n<ref name=\"b\"><span id=\"Z\">foo</span></ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo bar for a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"X\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"X\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-tag-ref angleBracket"
			},
			{
				"text": "span ",
				"name": "mw-tag-references mw-tag-ref tagName"
			},
			{
				"text": "id=",
				"name": "mw-tag-references mw-tag-ref attributeName"
			},
			{
				"text": "\"Z\"",
				"name": "mw-tag-references mw-tag-ref mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-tag-ref angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-tag-ref angleBracket"
			},
			{
				"text": "span",
				"name": "mw-tag-references mw-tag-ref tagName"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-tag-ref angleBracket"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T107652: <ref>s in templates that also generate table cell attributes should be rendered properly",
		"wikitext": "{|\n|{{table_attribs_7}}\n|}\n<references />",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_attribs_7",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Handle extension content in section headers properly",
		"wikitext": "==c<ref>d</ref>==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "d",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Non-diffing cite error",
		"wikitext": "<ref name=\"aaa\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"aaa\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "1. Multiple definition with the same complex content",
		"wikitext": "<ref name=\"a\"><b>abc</b></ref> <ref name=\"a\"><b>abc</b></ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "b",
				"name": "mw-tag-ref tagName"
			},
			{
				"text": ">",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "abc",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "b",
				"name": "mw-tag-ref tagName"
			},
			{
				"text": ">",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "b",
				"name": "mw-tag-ref tagName"
			},
			{
				"text": ">",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "abc",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "b",
				"name": "mw-tag-ref tagName"
			},
			{
				"text": ">",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "2. Multiple definition with the same complex content",
		"wikitext": "<ref name=\"b\">{{1x|abc}}</ref> <ref name=\"b\">{{1x|abc}}</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-tag-ref mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-tag-ref mw-template-ground separator"
			},
			{
				"text": "abc",
				"name": "mw-tag-ref mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-tag-ref mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-tag-ref mw-template-ground separator"
			},
			{
				"text": "abc",
				"name": "mw-tag-ref mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "3. Multiple definition with the same complex content, but one is templated",
		"wikitext": "{{1x|<ref name=\"ref\">{{1x|<span>txt</span>}}</ref>}} <ref name=\"ref\">{{1x|<span>txt</span>}}</ref>\n<references />",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-template-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-template-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"ref\"",
				"name": "mw-template-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-template-ground mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground mw-tag-ref mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground mw-tag-ref mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-tag-ref mw-template-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-template-ground mw-tag-ref mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-tag-ref mw-template-ground angleBracket"
			},
			{
				"text": "txt",
				"name": "mw-template-ground mw-tag-ref mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-tag-ref mw-template-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-template-ground mw-tag-ref mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-tag-ref mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-template-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"ref\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-tag-ref mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-tag-ref mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-tag-ref mw-template-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-tag-ref mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-tag-ref mw-template-ground angleBracket"
			},
			{
				"text": "txt",
				"name": "mw-tag-ref mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-tag-ref mw-template-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-tag-ref mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-tag-ref mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-tag-ref mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Nested reference with same name but different group",
		"wikitext": "{{#tag:ref|note <ref name=\"foo\" group=\"notes\">nested note</ref>|name=\"foo\"|group=\"foo\"}}\n\n<references group=\"foo\" />\n<references group=\"notes\" />",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "note ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": " group=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"notes\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "nested note",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "name=\"foo\"",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "group=\"foo\"",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"notes\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Nested reference with same name but different group (default in nested)",
		"wikitext": "{{#tag:ref|note <ref name=\"foo\">nested note</ref>|name=\"foo\"|group=\"foo\"}}\n\n<references />\n<references group=\"foo\" />",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "note ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "nested note",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "name=\"foo\"",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "group=\"foo\"",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Nested reference with same name but different group (default in outer)",
		"wikitext": "{{#tag:ref|note <ref name=\"foo\" group=\"foo\">nested note</ref>|name=\"foo\"}}\n\n<references />\n<references group=\"foo\" />",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "note ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": " group=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"foo\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "nested note",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "name=\"foo\"",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "References error without wrapper round-trip test",
		"wikitext": "<ref group=\"a\">foo</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "foo",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "T393913: Parsoid support for nested <ref> in different groups",
		"wikitext": "<ref name=\"thefourtruths\" group=\"lower-alpha\">asfd</ref>\n\n{{#tag:ref|<div><ref>123</ref></div>|name=\"thefourtruths\"|group=\"lower-alpha\"}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"thefourtruths\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"lower-alpha\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "asfd",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "123",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "name=\"thefourtruths\"",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "group=\"lower-alpha\"",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Roundtrip multiple follows",
		"wikitext": "<ref name=\"test\">hiho</ref>\n<ref follow=\"test\">hi</ref>\n<ref follow=\"test\">ho</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"test\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "hiho",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"test\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "hi",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"test\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ho",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "List-defined references with default and custom group",
		"wikitext": "<ref name=\"a\" /> <ref name=\"a\" group=\"g\" /> <ref name=\"b\" group=\"g\" />\n<references>\n<ref name=\"a\">Default group content</ref>\n</references>\n<references group=\"g\">\n<ref name=\"a\">Custom group content</ref>\n<ref name=\"b\">Custom group content other</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"g\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"g\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Default group content",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"g\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Custom group content",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Custom group content other",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Smoke test for duplicated references with the same text",
		"wikitext": "<ref name=\"a\">text</ref>\n<ref name=\"a\">text</ref>\n<ref name=\"b\">other</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "text",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "text",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "other",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Smoke test for duplicated references with conflicting text",
		"wikitext": "<ref name=\"a\">text</ref>\n<ref name=\"a\">bad</ref>\n<ref name=\"b\">other</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "text",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "bad",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "other",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Smoke test for references that are reused *before* defined in <references>",
		"wikitext": "<ref name=\"a\" />\n<ref name=\"a\" />\n<ref name=\"b\">other</ref>\n<references>\n<ref name=\"a\">text</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "other",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "text",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "It should be impossible to roll back a follow=\"…\", because it can't have a name",
		"wikitext": "<ref name=\"a\" />\n<ref name=\"b\">should be 2</ref>\n<references>\n<ref name=\"a\">should be 1</ref>\n<ref name=\"c\" follow=\"other page\">is invalid</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "should be 2",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "should be 1",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"c\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": " follow=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"other page\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "is invalid",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "It should be impossible to roll back a follow=\"…\", because it must have a name",
		"wikitext": "<ref name=\"a\" />\n<ref name=\"b\">should be 2</ref>\n<references>\n<ref name=\"a\">should be 1</ref>\n<ref follow=\"other page\">is invalid</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "should be 2",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "should be 1",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "follow=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"other page\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "is invalid",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Comments and Indent-Pre",
		"wikitext": "<!-- comment 1 --> asdf\n\n<!-- comment 1 --> asdf\n<!-- comment 2 -->\n\n<!-- comment 1 --> asdf\n<!-- comment 2 -->xyz\n\n<!-- comment 1 --> asdf\n<!-- comment 2 --> xyz",
		"nodes": [
			{
				"text": "<!-- comment 1 -->",
				"name": "comment"
			},
			{
				"text": "<!-- comment 1 -->",
				"name": "comment"
			},
			{
				"text": "<!-- comment 2 -->",
				"name": "comment"
			},
			{
				"text": "<!-- comment 1 -->",
				"name": "comment"
			},
			{
				"text": "<!-- comment 2 -->",
				"name": "comment"
			},
			{
				"text": "<!-- comment 1 -->",
				"name": "comment"
			},
			{
				"text": "<!-- comment 2 -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Comment test 2a",
		"wikitext": "asdf\n<!-- comment 1 -->\njkl",
		"nodes": [
			{
				"text": "<!-- comment 1 -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Comment test 2b",
		"wikitext": "asdf\n<!-- comment 1 -->\n\njkl",
		"nodes": [
			{
				"text": "<!-- comment 1 -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Comment test 3",
		"wikitext": "asdf\n<!-- comment 1 -->\n<!-- comment 2 -->\njkl",
		"nodes": [
			{
				"text": "<!-- comment 1 -->",
				"name": "comment"
			},
			{
				"text": "<!-- comment 2 -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Comment test 4",
		"wikitext": "asdf<!-- comment 1 -->jkl",
		"nodes": [
			{
				"text": "<!-- comment 1 -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Comment spacing",
		"wikitext": "a\n <!-- foo --> b <!-- bar -->\nc",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<!-- foo -->",
				"name": "comment"
			},
			{
				"text": "<!-- bar -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Comment whitespace",
		"wikitext": "<!-- returns a single newline, not nothing, since the newline after > is not stripped -->",
		"nodes": [
			{
				"text": "<!-- returns a single newline, not nothing, since the newline after > is not stripped -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Comment semantics and delimiters",
		"wikitext": "<!-- --><!----><!-----><!------>",
		"nodes": [
			{
				"text": "<!-- --><!----><!-----><!------>",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Comment semantics and delimiters, redux",
		"wikitext": "<!-- In SGML every \"foo\" here would actually show up in the text -- foo -- bar\n-- foo -- funky huh? ... -->",
		"nodes": [
			{
				"text": "<!-- In SGML every \"foo\" here would actually show up in the text -- foo -- bar",
				"name": "comment"
			},
			{
				"text": "-- foo -- funky huh? ... -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Comment semantics and delimiters: directors cut",
		"wikitext": "<!-- ... However we like to keep things simple and somewhat XML-ish so we eat\neverything starting with < followed by !-- until the first -- and > we see,\nthat wouldn't be valid XML however, since in XML -- has to terminate a comment\n-->-->",
		"nodes": [
			{
				"text": "<!-- ... However we like to keep things simple and somewhat XML-ish so we eat",
				"name": "comment"
			},
			{
				"text": "everything starting with < followed by !-- until the first -- and > we see,",
				"name": "comment"
			},
			{
				"text": "that wouldn't be valid XML however, since in XML -- has to terminate a comment",
				"name": "comment"
			},
			{
				"text": "-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Comment semantics: nesting",
		"wikitext": "<!--<!-- no, we're not going to do anything fancy here -->-->",
		"nodes": [
			{
				"text": "<!--<!-- no, we're not going to do anything fancy here -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Comment semantics: unclosed comment at end",
		"wikitext": "<!--This comment will run out to the end of the document",
		"nodes": [
			{
				"text": "<!--This comment will run out to the end of the document",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Comment semantics: normalize comments to play nice with XML and browsers",
		"wikitext": "<!-- Browsers --!> think this is closed -->\n<!--> This would normally be text -->\n<!---> As would this -->\n<!-- XML doesn't like trailing dashes -------->\n<!-- Nor doubled hyphens -- anywhere in the data -->\nBut this is not a comment.",
		"nodes": [
			{
				"text": "<!-- Browsers --!> think this is closed -->",
				"name": "comment"
			},
			{
				"text": "<!--> This would normally be text -->",
				"name": "comment"
			},
			{
				"text": "<!---> As would this -->",
				"name": "comment"
			},
			{
				"text": "<!-- XML doesn't like trailing dashes -------->",
				"name": "comment"
			},
			{
				"text": "<!-- Nor doubled hyphens -- anywhere in the data -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Comment semantics: round-trip even text which contains encoded -->",
		"wikitext": "<!-- hello & goodbye - > --&gt; --&amp;gt; --&xx -->",
		"nodes": [
			{
				"text": "<!-- hello & goodbye - > --&gt; --&amp;gt; --&xx -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Comment in template title",
		"wikitext": "{{f<!---->oo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "f",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "<!---->",
				"name": "mw-template-ground comment"
			},
			{
				"text": "oo",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Comment on its own line post-expand",
		"wikitext": "a\n{{blank}}<!---->\nb",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "blank",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<!---->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Comment on its own line post-expand with non-significant whitespace",
		"wikitext": "a\n {{blank}} <!----> \nb",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "blank",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<!---->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Multiple comments should still parse as SOL-transparent",
		"wikitext": "<!--c1-->*a\n<!--c2--><!--c3--><!--c4-->*b",
		"nodes": [
			{
				"text": "<!--c1-->",
				"name": "comment"
			},
			{
				"text": "<!--c2--><!--c3--><!--c4-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "IE conditional comments",
		"wikitext": "<!--[if lt IE 9]>\n\t<script>alert('hi');</script>\n<![endif]-->",
		"nodes": [
			{
				"text": "<!--[if lt IE 9]>",
				"name": "comment"
			},
			{
				"text": "\t<script>alert('hi');</script>",
				"name": "comment"
			},
			{
				"text": "<![endif]-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Comment with valid json",
		"wikitext": "hi <!--{\"hi\":\"ho\"}--> ho",
		"nodes": [
			{
				"text": "<!--{\"hi\":\"ho\"}-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Comment in attribute",
		"wikitext": "<div class=\"<!-- test -->123\">hi ho</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "class=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "<!-- test -->",
				"name": "comment"
			},
			{
				"text": "123\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Serialize comment-like string in attribute",
		"wikitext": "<div class=\"<!-- test -->123\">hi ho</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "class=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "<!-- test -->",
				"name": "comment"
			},
			{
				"text": "123\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Simple definition",
		"wikitext": ";name :Definition",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "name ",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "Definition list for indentation only",
		"wikitext": ":Indented text",
		"nodes": [
			{
				"text": ":",
				"name": "list"
			}
		]
	},
	{
		"desc": "Definition list with no space",
		"wikitext": ";name:Definition",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "name",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "Definition list with URL link",
		"wikitext": ";http://example.com/ :definition",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "http",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "Definition list with bracketed URL link",
		"wikitext": ";[http://www.example.com/ Example]:Something about it",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com/",
				"name": "mw-link-ground url mw-strong"
			},
			{
				"text": " ",
				"name": "mw-link-ground mw-strong"
			},
			{
				"text": "Example",
				"name": "mw-link-ground labelName mw-strong"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "Definition list with wikilink containing colon",
		"wikitext": ";[[Help:FAQ]]:The least-read page on Wikipedia",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Help:FAQ",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-strong"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "Definition list with news link containing colon",
		"wikitext": ";news:alt.wikipedia.rox :This isn't even a real newsgroup!",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "news",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "Malformed definition list with colon",
		"wikitext": ";news:alt.wikipedia.rox -- don't crash or enter an infinite loop",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "news",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "Definition lists: colon in external link text",
		"wikitext": ";[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.wikipedia2.org/",
				"name": "mw-link-ground url mw-strong"
			},
			{
				"text": " ",
				"name": "mw-link-ground mw-strong"
			},
			{
				"text": "Wikipedia :The Next Generation",
				"name": "mw-link-ground labelName mw-strong"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": " ",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "Definition lists: colon in HTML attribute",
		"wikitext": ";<b style=\"display: inline\">bold</b>",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "b ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"display: inline\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "bold",
				"name": "mw-strong"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Definition lists: self-closed tag",
		"wikitext": ";one<br/>two :two-line fun",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "one",
				"name": "mw-strong"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br",
				"name": "tagName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": "two ",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "Definition lists: ignore colons inside tags",
		"wikitext": ";one <b>two : tag <i>fun:</i>:</b>:def",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "one ",
				"name": "mw-strong"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "two ",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Definition lists: excess closed tags",
		"wikitext": ";one</b>two :bad tag fun",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "one",
				"name": "mw-strong"
			},
			{
				"text": "</b>",
				"name": "mw-error"
			},
			{
				"text": "two ",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "T13748: Literal closing tags",
		"wikitext": "<dl>\n<dt>test 1</dt>\n<dd>test test test test test</dd>\n<dt>test 2</dt>\n<dd>test test test test test</dd>\n</dl>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "dl",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "dt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "dt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "dd",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "dd",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "dt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "dt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "dd",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "dd",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "dl",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Definition and unordered list using wiki syntax nested in unordered list using html tags.",
		"wikitext": "<ul><li>\n;term :description\n*unordered\n</li></ul>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "term ",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Definition list with empty definition and following paragraph",
		"wikitext": ";term:\n\nParagraph text",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "term",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "Nested definition lists using html syntax",
		"wikitext": "<dl><dt>x</dt>\n<dd>a</dd>\n<dd>b</dd></dl>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "dl",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "dt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "dt",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "dd",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "dd",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "dd",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "dd",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "dl",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "No nesting: Multiple dd's",
		"wikitext": ";x\n:a\n:b",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "x",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": ":",
				"name": "list"
			}
		]
	},
	{
		"desc": "Indentation: Regular",
		"wikitext": ":i1\n::i2\n:::i3",
		"nodes": [
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "::",
				"name": "list"
			},
			{
				"text": ":::",
				"name": "list"
			}
		]
	},
	{
		"desc": "Indentation: Missing 1st level",
		"wikitext": "::i2\n:::i3",
		"nodes": [
			{
				"text": "::",
				"name": "list"
			},
			{
				"text": ":::",
				"name": "list"
			}
		]
	},
	{
		"desc": "Indentation: Multi-level indent",
		"wikitext": ":::i3",
		"nodes": [
			{
				"text": ":::",
				"name": "list"
			}
		]
	},
	{
		"desc": "Hacky use to indent tables",
		"wikitext": "::{|\n|foo\n|bar\n|}\nthis text\nshould be left alone",
		"nodes": [
			{
				"text": "::",
				"name": "operatorKeyword"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Hacky use to indent tables (with content following table)",
		"wikitext": ":{|\n|foo\n|bar\n|} <!--c1--> this text should be part of the dl",
		"nodes": [
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Hacky use to indent tables, with comments (T65979)",
		"wikitext": "<!-- foo -->\n::{|\n|foo\n|bar\n|}<!-- bar -->\nthis text\nshould be left alone",
		"nodes": [
			{
				"text": "<!-- foo -->",
				"name": "comment"
			},
			{
				"text": "::",
				"name": "operatorKeyword"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "<!-- bar -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Hacky use to indent tables, with comment before table",
		"wikitext": "::<!-- foo -->{|\n|foo\n|}",
		"nodes": [
			{
				"text": "::",
				"name": "list"
			},
			{
				"text": "<!-- foo -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Hack use to indent tables, in a nested list context (T262943)",
		"wikitext": "This is a discussion thread.\n\n:Parent comment.\n::Child comment\n::{|\n|With a\n|Table!\n|}",
		"nodes": [
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "::",
				"name": "list"
			},
			{
				"text": "::",
				"name": "operatorKeyword"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Hacky use to indent tables (WS-insensitive)",
		"wikitext": ":{|\n|a\n|}",
		"nodes": [
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Hacky use to indent tables (nl-insensitive)",
		"wikitext": ":{|\n\n\n|a\n|}",
		"nodes": [
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Table / list interaction: indented table with lists in table contents",
		"wikitext": ":{|\n|-\n|a\n\n*b\n|-\n|c\n\n*d\n|}",
		"nodes": [
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Table / list interaction: lists nested in tables nested in indented lists",
		"wikitext": ":{|\n|\n:a\n:b\n|\n*c\n*d\n|}\n\n*e\n*f",
		"nodes": [
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Nesting: Multi-level (Parsoid only)",
		"wikitext": ";t1:d1\n;;t2::d2\n;;;t3:::d3",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "t1",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": ";;",
				"name": "list"
			},
			{
				"text": "t2",
				"name": "mw-strong"
			},
			{
				"text": "::",
				"name": "operatorKeyword"
			},
			{
				"text": ";;;",
				"name": "list"
			},
			{
				"text": "t3",
				"name": "mw-strong"
			},
			{
				"text": ":::",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "Nesting: Test 2",
		"wikitext": ";t1\n::d2",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "t1",
				"name": "mw-strong"
			},
			{
				"text": "::",
				"name": "list"
			}
		]
	},
	{
		"desc": "Nesting: Test 3",
		"wikitext": ":;t1\n::::d2",
		"nodes": [
			{
				"text": ":;",
				"name": "list"
			},
			{
				"text": "t1",
				"name": "mw-strong"
			},
			{
				"text": "::::",
				"name": "list"
			}
		]
	},
	{
		"desc": "Nesting: Test 4",
		"wikitext": "::;t3\n:::d3",
		"nodes": [
			{
				"text": "::;",
				"name": "list"
			},
			{
				"text": "t3",
				"name": "mw-strong"
			},
			{
				"text": ":::",
				"name": "list"
			}
		]
	},
	{
		"desc": "Mixed Lists: Test 1",
		"wikitext": ":;*foo\n::*bar\n:;baz",
		"nodes": [
			{
				"text": ":;*",
				"name": "list"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": "::*",
				"name": "list"
			},
			{
				"text": ":;",
				"name": "list"
			},
			{
				"text": "baz",
				"name": "mw-strong"
			}
		]
	},
	{
		"desc": "Mixed Lists: Test 2",
		"wikitext": "*:d1\n*:d2",
		"nodes": [
			{
				"text": "*:",
				"name": "list"
			},
			{
				"text": "*:",
				"name": "list"
			}
		]
	},
	{
		"desc": "Mixed Lists: Test 3",
		"wikitext": "*:::d1\n*:::d2",
		"nodes": [
			{
				"text": "*:::",
				"name": "list"
			},
			{
				"text": "*:::",
				"name": "list"
			}
		]
	},
	{
		"desc": "Mixed Lists: Test 4",
		"wikitext": "*;d1 :d2\n*;d3 :d4",
		"nodes": [
			{
				"text": "*;",
				"name": "list"
			},
			{
				"text": "d1 ",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "*;",
				"name": "list"
			},
			{
				"text": "d3 ",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "Mixed Lists: Test 5",
		"wikitext": "*:d1\n*::d2",
		"nodes": [
			{
				"text": "*:",
				"name": "list"
			},
			{
				"text": "*::",
				"name": "list"
			}
		]
	},
	{
		"desc": "Mixed Lists: Test 6",
		"wikitext": "#*:d1\n#*:::d3",
		"nodes": [
			{
				"text": "#*:",
				"name": "list"
			},
			{
				"text": "#*:::",
				"name": "list"
			}
		]
	},
	{
		"desc": "Mixed Lists: Test 7",
		"wikitext": ":*d1\n:*d2",
		"nodes": [
			{
				"text": ":*",
				"name": "list"
			},
			{
				"text": ":*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Mixed Lists: Test 8",
		"wikitext": ":*d1\n::*d2",
		"nodes": [
			{
				"text": ":*",
				"name": "list"
			},
			{
				"text": "::*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Mixed Lists: Test 9",
		"wikitext": "*;foo :bar",
		"nodes": [
			{
				"text": "*;",
				"name": "list"
			},
			{
				"text": "foo ",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "Mixed Lists: Test 10",
		"wikitext": "*#;foo :bar",
		"nodes": [
			{
				"text": "*#;",
				"name": "list"
			},
			{
				"text": "foo ",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "Mixed Lists: Test 11",
		"wikitext": ";a\n:*b",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "a",
				"name": "mw-strong"
			},
			{
				"text": ":*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Mixed Lists: Test 13",
		"wikitext": "*#*#;*;;foo : bar\n*#*#;boo : baz",
		"nodes": [
			{
				"text": "*#*#;*;;",
				"name": "list"
			},
			{
				"text": "foo ",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": " bar",
				"name": "mw-strong"
			},
			{
				"text": "*#*#;",
				"name": "list"
			},
			{
				"text": "boo ",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "colons occurring in tags",
		"wikitext": ";a:b\n;'''a:b'''\n;<i>a:b</i>\n;<span>a:b</span>\n;<div>a:b</div>\n;<div>a\n:b</div>\n;{{1x|a:b}}\n;{{1x|''a:b''}}\n;;;''a:b''",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "a",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "a",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "b",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "a",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "a",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "a",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "a",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a:b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "''a:b''",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": ";;;",
				"name": "list"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "a",
				"name": "mw-strong mw-em"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "b",
				"name": "mw-strong mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "colons and tables 1",
		"wikitext": ":{|\n|x\n|}\n:{|\n|y\n|}",
		"nodes": [
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Template interaction",
		"wikitext": "::{{definition_list}}\n\n:one\n::{{definition_list}}\n:::two\n:::three\n::four",
		"nodes": [
			{
				"text": "::",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "definition_list",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "::",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "definition_list",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": ":::",
				"name": "list"
			},
			{
				"text": ":::",
				"name": "list"
			},
			{
				"text": "::",
				"name": "list"
			}
		]
	},
	{
		"desc": "Second colon on line: No templates involved",
		"wikitext": ";term:def=foo:bar\n\n;'''1:00''':bar",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "term",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "1",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "00",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Second colon on line: Templates involved and T2959 kicks in",
		"wikitext": ":a\n::{{1x|1=::foo}} bar\n\n;term:def=foo{{1x|:bar}}",
		"nodes": [
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "::",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "::foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "term",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": ":bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Void elements without self-closing slash in definition lists",
		"wikitext": ";[[File:Foobar.jpg|Test]]:123\n;Test<br>12:3",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-strong"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Test",
				"name": "mw-link-ground string mw-strong"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "Test",
				"name": "mw-strong"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "12",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "Parser function inside dl-dt list should be tokenized correctly",
		"wikitext": "; -{{#dir:en|bcp47}}:123",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": " -",
				"name": "mw-strong"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#dir",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "en",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "bcp47",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "External links: non-bracketed",
		"wikitext": "Non-bracketed: http://example.com",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "External links: numbered",
		"wikitext": "Numbered: [http://example.com]\nNumbered: [http://example.net]\nNumbered: [http://example.com]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.net",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: specified text",
		"wikitext": "Specified text: [http://example.com link]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "link",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: trail",
		"wikitext": "Linktrails should not work for external links: [http://example.com link]s",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "link",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: dollar sign in URL",
		"wikitext": "http://example.com/1$2345",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/1$2345",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "External links: dollar sign in URL (autonumber)",
		"wikitext": "[http://example.com/1$2345]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com/1$2345",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: open square bracket forbidden in URL (T6377)",
		"wikitext": "http://example.com/1[2345",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/1",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "External links: open square bracket forbidden in URL (named) (T6377)",
		"wikitext": "[http://example.com/1[2345]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com/1[2345",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: open square bracket forbidden in URL (named) (T6377)\nParsoid variant.",
		"wikitext": "[http://example.com/1 [2345]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com/1",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "[2345",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: nowiki in URL link text (T8230)",
		"wikitext": "[http://example.com/ <nowiki>''example site''</nowiki>]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com/",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''example site''",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: newline forbidden in text (T8230 regression check)",
		"wikitext": "[http://example.com/ first\nsecond]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com/",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "first",
				"name": "mw-link-ground labelName"
			}
		]
	},
	{
		"desc": "External links: Pipe char between url and text",
		"wikitext": "[http://example.com | link]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "| link",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: protocol-relative URL in brackets",
		"wikitext": "[//example.com/ Test]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "//",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com/",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "Test",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: protocol-relative URL in brackets without text",
		"wikitext": "[//example.com]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "//",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: protocol-relative URL in free text is left alone",
		"wikitext": "//example.com/Foo",
		"nodes": []
	},
	{
		"desc": "External links: protocol-relative URL in the middle of a word is left alone (T32269)",
		"wikitext": "foo//example.com/Foo",
		"nodes": []
	},
	{
		"desc": "External links: with no contents",
		"wikitext": "[http://en.wikipedia.org/wiki/Foo]\n\n[[wikipedia:Foo|Bar]]\n\n[[wikipedia:Foo|<span>Bar</span>]]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "en.wikipedia.org/wiki/Foo",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "wikipedia:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "wikipedia:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "Bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "</",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "External links: Free with trailing punctuation",
		"wikitext": "http://example.com,\nhttp://example.com;\nhttp://example.com\\\nhttp://example.com.\nhttp://example.com:\nhttp://example.com!\nhttp://example.com?\nhttp://example.com)\nhttp://example.com/url_with_(brackets)\n(http://example.com/url_without_brackets)\nhttp://example.com/url_with_entity&amp;\nhttp://example.com/url_with_entity&#x26;\nhttp://example.com/url_with_entity&#038;\nhttp://example.com/url_with_entity&nbsp;\nhttp://example.com/url_with_entity&#xA0;\nhttp://example.com/url_with_entity&#160;\nhttp://example.com/url_with_entity&lt;\nhttp://example.com/url_with_entity&#x3C;\nhttp://example.com/url_with_entity&#60;",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com;",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com\\",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com:",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com!",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com?",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/url_with_(brackets",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/url_with_entity&amp;",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/url_with_entity&#x26;",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/url_with_entity&#038;",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/url_with_entity&nbsp;",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/url_with_entity&#xA0;",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/url_with_entity&#160;",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/url_with_entity&lt;",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/url_with_entity&#x3C;",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/url_with_entity&#60;",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "External links: tricky Parsoid html2html case",
		"wikitext": "http://example.com/url_with_entity&amp;amp;",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/url_with_entity&amp;amp;",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "External links: html2html with trailing dot (T263203)",
		"wikitext": "test [http://example.com/test. http://example.com/test.] test\n\ntest http://example.com/test. test",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com/test.",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "http://example.com/test.",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/test",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "External links: Free with trailing quotes (T113666)",
		"wikitext": "'''News:''' Stuff here\n\nnews:'a'b''c''d e",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "News:",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "c",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "External links: with entity",
		"wikitext": "[http://&#x20;www.librarieswithoutborders.org Libraries without borders]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "&#x20;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "www.librarieswithoutborders.org",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "Libraries without borders",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: Lone protocols are never linked (T105697)",
		"wikitext": "http://\nhttp://;\n(http://)\nbitcoin:\nbitcoin:;\n(bitcoin:)",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": ";",
				"name": "mw-free-extlink"
			},
			{
				"text": "bitcoin:",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": ";",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "External links: No preceding word characters allowed (T67278)",
		"wikitext": "NOPEhttp://example.com\nN0http://example.com\nok:http://example.com\nok-http://example.com",
		"nodes": []
	},
	{
		"desc": "External links: nofollow domain exception",
		"wikitext": "A [https://no-nofollow.org/foobar link], and another [https://example.org link].",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "https://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "no-nofollow.org/foobar",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "link",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "https://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.org",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "link",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External image",
		"wikitext": "External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "meta.wikimedia.org/upload/f/f1/Ncwikicol.png",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "External image from https",
		"wikitext": "External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png",
		"nodes": [
			{
				"text": "https://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "meta.wikimedia.org/upload/f/f1/Ncwikicol.png",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "External image (when not allowed)",
		"wikitext": "External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "meta.wikimedia.org/upload/f/f1/Ncwikicol.png",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "Link to non-http image, no img tag",
		"wikitext": "Link to non-http image, no img tag: ftp://example.com/test.jpg",
		"nodes": [
			{
				"text": "ftp://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/test.jpg",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "External links: terminating separator",
		"wikitext": "Terminating separator: http://example.com/thing,",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/thing",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "External links: intervening separator",
		"wikitext": "Intervening separator: http://example.com/1,2,3",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/1,2,3",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "External links: old bug with URL in query",
		"wikitext": "Old bug with URL in query: [http://example.com/thing?url=http://example.com link]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com/thing?url=http://example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "link",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: old URL-in-URL bug, mixed protocols",
		"wikitext": "And again with mixed protocols: [ftp://example.com?url=http://example.com link]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "ftp://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com?url=http://example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "link",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: URL in text",
		"wikitext": "URL in text: [http://example.com http://example.com]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "http://example.com",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: Clickable images",
		"wikitext": "ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: raw ampersand",
		"wikitext": "Old &amp; use: http://x&y",
		"nodes": [
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "x&y",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "External links: encoded ampersand",
		"wikitext": "Old &amp; use: http://x&amp;y",
		"nodes": [
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "x&amp;y",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "External links: encoded equals (T8102)",
		"wikitext": "http://example.com/?foo&#61;bar",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/?foo&#61;bar",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "External links: [raw ampersand]",
		"wikitext": "Old &amp; use: [http://x&y]",
		"nodes": [
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "x&y",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: [encoded ampersand]",
		"wikitext": "Old &amp; use: [http://x&amp;y]",
		"nodes": [
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "x",
				"name": "mw-link-ground url"
			},
			{
				"text": "&amp;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "y",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: [raw equals]",
		"wikitext": "[http://example.com/?foo=bar]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com/?foo=bar",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: [encoded equals] (T8102)",
		"wikitext": "[http://example.com/?foo&#61;bar]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com/?foo",
				"name": "mw-link-ground url"
			},
			{
				"text": "&#61;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "bar",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: [IDN ignored character reference in hostname; strip it right off]",
		"wikitext": "[http://e&zwnj;xample.com/]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "e",
				"name": "mw-link-ground url"
			},
			{
				"text": "&zwnj;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "xample.com/",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: IDN ignored character reference in hostname; strip it right off",
		"wikitext": "http://e&zwnj;xample.com/",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "e&zwnj;xample.com/",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "External links: www.jpeg.org (T2554)",
		"wikitext": "http://www.jpeg.org",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "www.jpeg.org",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "External links: URL within URL (T2002)",
		"wikitext": "[http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "T2361: URL inside bracketed URL",
		"wikitext": "[http://www.example.com/foo http://www.example.com/bar]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com/foo",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "http://www.example.com/bar",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "T2361: URL within URL, not bracketed",
		"wikitext": "http://www.example.com/foo?=http://www.example.com/bar",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "www.example.com/foo?=http://www.example.com/bar",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "T2289: \">\"-token in URL-tail",
		"wikitext": "http://www.example.com/<hello>",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "www.example.com/",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "T2289: literal \">\"-token in URL-tail",
		"wikitext": "http://www.example.com/<b>html</b>",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "www.example.com/",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T2289: \">\"-token in bracketed URL",
		"wikitext": "[http://www.example.com/<hello> stuff]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com/<hello>",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "stuff",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "T2289: literal \">\"-token in bracketed URL",
		"wikitext": "[http://www.example.com/<b>html</b> stuff]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com/<b>html</b>",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "stuff",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "T2289: literal double quote at end of URL",
		"wikitext": "http://www.example.com/\"hello\"",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "www.example.com/\"hello\"",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "T2289: literal double quote in bracketed URL",
		"wikitext": "[http://www.example.com/\"hello\" stuff]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com/\"hello\"",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "stuff",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)",
		"wikitext": "[http://www.example.com  test]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": "  ",
				"name": "mw-link-ground"
			},
			{
				"text": "test",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: link text with spaces",
		"wikitext": "[http://www.example.com a b c]\n[http://www.example.com ''a'' ''b'']",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "a b c",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "''",
				"name": "mw-link-ground character"
			},
			{
				"text": "a",
				"name": "mw-link-ground labelName mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground character"
			},
			{
				"text": " ",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "''",
				"name": "mw-link-ground character"
			},
			{
				"text": "b",
				"name": "mw-link-ground labelName mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground character"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External links: wiki links within external link (T5695)",
		"wikitext": "[http://example.com [[wikilink]] embedded in ext link]\n\n[http://example.com test [[wikilink]] embedded in ext link]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "[[wikilink",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "test [[wikilink",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "T2787: Links with one slash after the url protocol are invalid",
		"wikitext": "http:/example.com\n\n[http:/example.com title]",
		"nodes": []
	},
	{
		"desc": "Bracketed external links with template-generated invalid target",
		"wikitext": "[{{1x|http:/example.com}} title]",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "http:/example.com",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T6781: %26 in URL",
		"wikitext": "http://www.example.com/?title=AT%26T",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "www.example.com/?title=AT%26T",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "T6781, T7267: %25 in URL",
		"wikitext": "http://www.example.com/?title=100%25_Bran",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "www.example.com/?title=100%25_Bran",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "T6781, T7267: %28, %29 in URL",
		"wikitext": "http://www.example.com/?title=Ben-Hur_%281959_film%29",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "www.example.com/?title=Ben-Hur_%281959_film%29",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "T6781: %26 in autonumber URL",
		"wikitext": "[http://www.example.com/?title=AT%26T]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com/?title=AT%26T",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "T6781, T7267: %26 in autonumber URL",
		"wikitext": "[http://www.example.com/?title=100%25_Bran]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com/?title=100%25_Bran",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "T6781, T7267: %28, %29 in autonumber URL",
		"wikitext": "[http://www.example.com/?title=Ben-Hur_%281959_film%29]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com/?title=Ben-Hur_%281959_film%29",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "T6781: %26 in bracketed URL",
		"wikitext": "[http://www.example.com/?title=AT%26T link]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com/?title=AT%26T",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "link",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "T6781, T7267: %25 in bracketed URL",
		"wikitext": "[http://www.example.com/?title=100%25_Bran link]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com/?title=100%25_Bran",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "link",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "T6781, T7267: %28, %29 in bracketed URL",
		"wikitext": "[http://www.example.com/?title=Ben-Hur_%281959_film%29 link]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com/?title=Ben-Hur_%281959_film%29",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "link",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External link containing a period in the anchor. (T65947)",
		"wikitext": "[//foo.org/bar#baz. bang]\n\n[//foo.org/bar. bang]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "//",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "foo.org/bar#baz.",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "bang",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "//",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "foo.org/bar.",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "bang",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External link containing a single quote. (T65947)",
		"wikitext": "[//foo.org/bar'baz]\n\n[//foo.org/bar'baz bang]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "//",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "foo.org/bar'baz",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "//",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "foo.org/bar'baz",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "bang",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External link containing double-single-quotes in text '' (T6598 check)",
		"wikitext": "Some [http://example.com/ pretty ''italics'' and stuff]!",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com/",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "pretty ",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "''",
				"name": "mw-link-ground character"
			},
			{
				"text": "italics",
				"name": "mw-link-ground labelName mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground character"
			},
			{
				"text": " and stuff",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External link containing double-single-quotes in text embedded in italics (T6598 check)",
		"wikitext": "''Some [http://example.com/ pretty ''italics'' and stuff]!''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "Some ",
				"name": "mw-em"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com/",
				"name": "mw-link-ground url mw-em"
			},
			{
				"text": " ",
				"name": "mw-link-ground mw-em"
			},
			{
				"text": "pretty ",
				"name": "mw-link-ground labelName mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground character"
			},
			{
				"text": "italics",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "''",
				"name": "mw-link-ground character"
			},
			{
				"text": " and stuff",
				"name": "mw-link-ground labelName mw-em"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "!",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "External link containing double-single-quotes with no space separating the url from text in italics",
		"wikitext": "[http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm''La muerte de Casagemas'' (1901) en el sitio de [[Museo Picasso (París)|Museo Picasso]].]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.musee-picasso.fr/pages/page_id18528_u1l2.htm",
				"name": "mw-link-ground url"
			},
			{
				"text": "''",
				"name": "mw-link-ground character"
			},
			{
				"text": "La muerte de Casagemas",
				"name": "mw-link-ground labelName mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground character"
			},
			{
				"text": " (1901) en el sitio de [[Museo Picasso (París)|Museo Picasso",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External link with comments in link text",
		"wikitext": "[http://www.google.com Google <!-- comment -->]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.google.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "Google ",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "<!-- comment -->",
				"name": "mw-link-ground comment"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "External link to bare IPv4 address",
		"wikitext": "[http://192.168.0.1 Link]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "192.168.0.1",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "Link",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "URL-encoding in URL functions (single parameter)",
		"wikitext": "{{localurl:Some page|amp=&}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "localurl",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Some page",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "amp=&",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "URL-encoding in URL functions (multiple parameters)",
		"wikitext": "{{localurl:Some page|q=?&amp=&}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "localurl",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Some page",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "q=?&amp=&",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Brackets in urls",
		"wikitext": "http://example.com/index.php?foozoid%5B%5D=bar\n\nhttp://example.com/index.php?foozoid&#x5B;&#x5D;=bar",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/index.php?foozoid%5B%5D=bar",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/index.php?foozoid&#x5B;&#x5D;=bar",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "IPv6 urls, autolink format (T23261)",
		"wikitext": "http://[2404:130:0:1000::187:2]/index.php\n\nExamples from RFC 2373, section 2.2:\n\n*http://[1080::8:800:200C:417A]/unicast\n*http://[FF01::101]/multicast\n*http://[::1]/loopback\n*http://[::]/unspecified\n*http://[::13.1.68.3]/ipv4compat\n*http://[::FFFF:129.144.52.38]/ipv4compat\n\nExamples from RFC 2732, section 2:\n\n*http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html\n*http://[1080:0:0:0:8:800:200C:417A]/index.html\n*http://[3ffe:2a00:100:7031::1]\n*http://[1080::8:800:200C:417A]/foo\n*http://[::192.9.5.5]/ipng\n*http://[::FFFF:129.144.52.38]:80/index.html\n*http://[2010:836B:4179::836B:4179]",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Unicode text around autolinks",
		"wikitext": "größhttps://foo.org\n\ngröß https://foo.org\n\n아들 고건 사진https://foo.org\n\n💩https://foo.org",
		"nodes": [
			{
				"text": "https://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "foo.org",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "IPv6 urls, bracketed format (T23261)",
		"wikitext": "[http://[2404:130:0:1000::187:2]/index.php test]\n\nExamples from RFC 2373, section 2.2:\n\n*[http://[1080::8:800:200C:417A] unicast]\n*[http://[FF01::101] multicast]\n*[http://[::1]/ loopback]\n*[http://[::] unspecified]\n*[http://[::13.1.68.3] ipv4compat]\n*[http://[::FFFF:129.144.52.38] ipv4compat]\n\nExamples from RFC 2732, section 2:\n\n*[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]\n*[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]\n*[http://[3ffe:2a00:100:7031::1] 3]\n*[http://[1080::8:800:200C:417A]/foo 4]\n*[http://[::192.9.5.5]/ipng 5]\n*[http://[::FFFF:129.144.52.38]:80/index.html 6]\n*[http://[2010:836B:4179::836B:4179] 7]",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Non-extlinks in brackets",
		"wikitext": "[foo]\n[foo bar]\n[foo ''bar'']\n[fool's] errand\n[fool's errand]\n[{{1x|foo}}]\n[{{1x|foo}} bar]\n[{{1x|foo}} ''bar'']\n[{{1x|foo}}l's] errand\n[{{1x|foo}}l's errand]\n[url={{1x|foo}}]\n[url=http://example.com]\n[http:// bare protocols don't count]",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "bar",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "bar",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Percent encoding in external links",
		"wikitext": "[https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "https://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "github.com/search?l=&q=ResourceLoader+%40wikimedia",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "Search",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Use url link syntax for links where the content is equal the link target",
		"wikitext": "http://example.com",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "Parenthesis in external links, especially URL links",
		"wikitext": "http://example.com)\n\nhttp://example.com/test)\n\nhttp://example.com/(test)\n\nhttp://example.com/((test)\n\n(http://example.com/(test))\n\n(http://example.com/(test)))))\n\nhttp://example.com/a)b\n\n[http://example.com) foo]",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/test",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/(test",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/((test",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/a)b",
				"name": "mw-free-extlink"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com)",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "foo",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Parenthesis in external links, w/ transclusion or comment",
		"wikitext": "(http://example.com/{{1x|hi}})\n\n(http://example.com<!-- hi -->)",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "hi",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<!-- hi -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)",
		"wikitext": "[http://en.wikipedia.org/wiki/European_Robin European Robin]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "en.wikipedia.org/wiki/European_Robin",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "European Robin",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Parsoid extlink with _blank target",
		"wikitext": "[https://www.example.com]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "https://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Parsoid extlink with _self target",
		"wikitext": "[https://www.example.com]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "https://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Extlink in square brackets with entity",
		"wikitext": "[&nbsp;[http://test.com 123]&nbsp;]\n\n[http://test.com [123]",
		"nodes": [
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "test.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "123",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "test.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "[123",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Extlink in indent pre gets link attributes",
		"wikitext": " [http://test.com 123]",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "test.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "123",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Extension tags in extension content: <nowiki>",
		"wikitext": "{{#tag:nowiki|a<nowiki>b</nowiki>c}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "a",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "b",
				"name": "mw-ext-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "c",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Extension tags in extension content: <pre>",
		"wikitext": "{{#tag:pre|a<nowiki>b</nowiki>c}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "pre",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "a",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "b",
				"name": "mw-ext-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "c",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Extension tags in extension content: <indicator>",
		"wikitext": "{{#tag:indicator|a<nowiki>b</nowiki>c|name=foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "indicator",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "a",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "b",
				"name": "mw-ext-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "c",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "name=foo",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Extension tags in extension attributes: <pre>",
		"wikitext": "{{#tag:pre|content|class=a<nowiki>b</nowiki>c}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "pre",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "content",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "class=a",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "b",
				"name": "mw-ext-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "c",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Extension tags in extension attributes: <indicator>",
		"wikitext": "{{#tag:indicator|content|name=a<nowiki>b</nowiki>c}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "indicator",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "content",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "name=a",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "b",
				"name": "mw-ext-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "c",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Extension tags in extension attributes: bogus tag name",
		"wikitext": "{{#tag:does-not-exist|<nowiki>content</nowiki>|name=a<nowiki>b</nowiki>c}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "does-not-exist",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "content",
				"name": "mw-ext-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "name=a",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "b",
				"name": "mw-ext-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "c",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Extension tags in extension name",
		"wikitext": "{{#tag:no<nowiki>ignored</nowiki>wiki|content}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "ignored",
				"name": "mw-ext-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "wiki",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "content",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Doubly-nested tags",
		"wikitext": "{{#tag:nowiki|more {{#tag:nowiki|content <nowiki>here</nowiki>}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "more ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": "nowiki",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": "content ",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext2-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext2-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext2-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "here",
				"name": "mw-ext2-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-ext2-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext2-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext2-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Input times are UTC, not local time",
		"wikitext": "{{#time:c|15 January 2001}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#time",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "c",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "15 January 2001",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Time test in traditional range...",
		"wikitext": "{{#time:Y|15 January 2001}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#time",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Y",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "15 January 2001",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Time test prior to 1970 Unix creation myth",
		"wikitext": "{{#time:Y|5 April 1967}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#time",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Y",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "5 April 1967",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Time test after the 2038 32-bit Apocalype",
		"wikitext": "{{#time:Y|28 July 2061}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#time",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Y",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "28 July 2061",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Explicitly specified timezone: UTC",
		"wikitext": "{{#time:Y-m-d H:i| 2011-11-12 23:00 UTC }}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#time",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Y-m-d H:i",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 2011-11-12 23:00 UTC ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Explicitly specified timezone: Europe/Paris (UTC+1)",
		"wikitext": "{{#time:Y-m-d H:i| 2011-11-12 23:00 Europe/Paris }}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#time",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Y-m-d H:i",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 2011-11-12 23:00 Europe/Paris ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Explicitly specified timezone: America/New_York (UTC-5)",
		"wikitext": "{{#time:Y-m-d H:i| 2011-11-12 23:00 America/New_York }}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#time",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Y-m-d H:i",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 2011-11-12 23:00 America/New_York ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Explicitly specified output language (Dutch)",
		"wikitext": "{{#time:d F Y|1988-02-28|nl}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#time",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "d F Y",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1988-02-28",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "nl",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#timel: UTC",
		"wikitext": "{{#timel: Y-m-d H:i | 15 January 2001}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#timel",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " Y-m-d H:i ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 15 January 2001",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#timel: Melbourne",
		"wikitext": "{{#timel: Y-m-d H:i | 16 January 2001}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#timel",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " Y-m-d H:i ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 16 January 2001",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#timef: one parameter",
		"wikitext": "{{#timef:15 January 2001}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#timef",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "15 January 2001",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#timef: date only",
		"wikitext": "{{#timef:15 January 2001|date}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#timef",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "15 January 2001",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "date",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#timef: time only",
		"wikitext": "{{#timef:15 January 2001|time}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#timef",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "15 January 2001",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "time",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#timef: \"pretty\" format",
		"wikitext": "{{#timef:15 January 2001|pretty}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#timef",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "15 January 2001",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "pretty",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#timef: ja parameter",
		"wikitext": "{{#timef:15 January 2001|both|ja}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#timef",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "15 January 2001",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "both",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ja",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#timefl: one parameter",
		"wikitext": "{{#timefl:17 January 2001}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#timefl",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "17 January 2001",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#titleparts",
		"wikitext": "{{#titleparts:A/b/c/d}}\n{{#titleparts:A/b/c/d|1}}\n{{#titleparts:A/b/c/d|2}}\n{{#titleparts:A/b/c/d|-3}}\n{{#titleparts:A/b/c/d||1}}\n{{#titleparts:A/b/c/d||2}}\n{{#titleparts:A/b/c/d||-2}}\n{{#titleparts:A/b/c/d|1|1}}\n{{#titleparts:A/b/c/d|1|2}}\n{{#titleparts:A/b/c/d|1|-2}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#titleparts",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "A/b/c/d",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#titleparts",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "A/b/c/d",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#titleparts",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "A/b/c/d",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#titleparts",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "A/b/c/d",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#titleparts",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "A/b/c/d",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "||",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#titleparts",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "A/b/c/d",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "||",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#titleparts",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "A/b/c/d",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "||",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#titleparts",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "A/b/c/d",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#titleparts",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "A/b/c/d",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#titleparts",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "A/b/c/d",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#titleparts stops splitting after 25 parts",
		"wikitext": "{{#titleparts:A/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/!/!/!|24}}\n{{#titleparts:A/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/!/!/!|25}}\n{{#titleparts:A/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/!/!/!|-1}}\n{{#titleparts:A/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/!/!/!||-1}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#titleparts",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "A/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/!/!/!",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "24",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#titleparts",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "A/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/!/!/!",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "25",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#titleparts",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "A/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/!/!/!",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#titleparts",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "A/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/!/!/!",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "||",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Zero parameters in #if and such",
		"wikitext": "[{{#ifexpr:}},{{#if:}},{{#ifeq:}},{{#switch:}},{{#ifexist:}}]",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexpr",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifeq",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexist",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Empty condition in #if and such",
		"wikitext": "Empty ifexpr is {{#ifexpr:|true|false}}\nEmpty if is {{#if:|true|false}}\nEmpty ifeq is {{#ifeq:||equal|not equal}}\nEmpty switch is {{#switch:|=empty|#default=something else}}\nEmpty ifexist is {{#ifexist:|true|false}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexpr",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "true",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "false",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "true",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "false",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifeq",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":||",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "equal",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "not equal",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "=empty",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "#default=something else",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexist",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "true",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "false",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Missing or all-empty outputs",
		"wikitext": "[{{#ifexpr: 1}},{{#ifexpr: 1|}},{{#ifexpr: 1||}}]\n[{{#if: 1}},{{#if: 1|}},{{#if: 1||}}]\n[{{#ifeq: 1|1}},{{#ifeq: 1|1|}},{{#ifeq: 1|1||}}]\n[{{#switch: 1}},{{#switch: 1|}}]\n[{{#ifexist: ParserFunctions page}},{{#ifexist: ParserFunctions page|}},{{#ifexist: ParserFunctions page||}}]",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexpr",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexpr",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexpr",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "||",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "||",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifeq",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifeq",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifeq",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "||",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexist",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ParserFunctions page",
				"name": "mw-ext-ground unit mw-pagename mw-function-0"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexist",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ParserFunctions page",
				"name": "mw-ext-ground unit mw-pagename mw-function-0"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexist",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ParserFunctions page",
				"name": "mw-ext-ground unit mw-pagename mw-function-0"
			},
			{
				"text": "||",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Preserve tags in #switch default value",
		"wikitext": "{{#switch:a|b|<div>c</div>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "a",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "b",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "c",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "</",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Bug 19093: Default values don't fall through in switch",
		"wikitext": "<{{#switch: foo | bar | #default = DEF }}>\n<{{#switch: foo | #default | bar = DEF }}>",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " foo ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " bar ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " #default = DEF ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " foo ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " #default ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " bar = DEF ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "{{#ifexist}}",
		"wikitext": "{{#ifexist:Media:Foobar.jpg|Found|Not found}}\n{{#ifexist:ParserFunctions page|Found|Not found}}\n{{#ifexist:Missing|Found|Not found}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexist",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Media:Foobar.jpg",
				"name": "mw-ext-ground unit mw-pagename mw-function-0"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Found",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Not found",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexist",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ParserFunctions page",
				"name": "mw-ext-ground unit mw-pagename mw-function-0"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Found",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Not found",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexist",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Missing",
				"name": "mw-ext-ground unit mw-pagename mw-function-0"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Found",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Not found",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "{{#ifexist:}} media redirect (bug 32031)",
		"wikitext": "{{#ifexist:Media:Redirect_to_Foobar.jpg|Found|Not found}}\n{{#ifexist:Media:Redirect_to_nowhere.jpg|Found|Not found}}\n{{#ifexist:Media:Missing file.jpg|Found|Not found}}\n{{#ifexist:Media:Dionysos-Brunnen am Kölner Dom.jpg|Found|Not found}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexist",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Media:Redirect_to_Foobar.jpg",
				"name": "mw-ext-ground unit mw-pagename mw-function-0"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Found",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Not found",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexist",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Media:Redirect_to_nowhere.jpg",
				"name": "mw-ext-ground unit mw-pagename mw-function-0"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Found",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Not found",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexist",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Media:Missing file.jpg",
				"name": "mw-ext-ground unit mw-pagename mw-function-0"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Found",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Not found",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexist",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Media:Dionysos-Brunnen am Kölner Dom.jpg",
				"name": "mw-ext-ground unit mw-pagename mw-function-0"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Found",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Not found",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#if",
		"wikitext": "{{#if: | yes | no}}\n{{#if: string | yes | no}}\n{{#if:      | yes | no}}\n{{#if:\n\n\n| yes | no}}\n{{#if: 1==2 | yes | no}}\n{{#if: foo | yes }}\n{{#if: | yes }}(empty)\n{{#if: foo | | no}}(empty)\n{{#if: {{{1}}} | yes | no}}\n{{#if: {{{1|}}} | yes | no}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " string ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "      ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1==2 ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " foo ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " foo ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "{{{",
				"name": "mw-ext-ground brace"
			},
			{
				"text": "1",
				"name": "mw-ext-ground variableName"
			},
			{
				"text": "}}}",
				"name": "mw-ext-ground brace"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "{{{",
				"name": "mw-ext-ground brace"
			},
			{
				"text": "1",
				"name": "mw-ext-ground variableName"
			},
			{
				"text": "|",
				"name": "mw-ext-ground mw-templatevariable-delimiter"
			},
			{
				"text": "}}}",
				"name": "mw-ext-ground brace"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#ifeq",
		"wikitext": "{{#ifeq: 01 | 1 | yes | no}}\n{{#ifeq: 0 | -0 | yes | no}}\n{{#ifeq: foo | bar | yes | no}}\n{{#ifeq: foo | Foo | yes | no}}\n{{#ifeq: \"01\" | \"1\" | yes | no}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifeq",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 01 ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1 ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifeq",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 0 ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " -0 ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifeq",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " foo ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " bar ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifeq",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " foo ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " Foo ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifeq",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " \"01\" ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " \"1\" ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#ifeq entities",
		"wikitext": "{{#ifeq: {{PAGENAME:*foo&bar}} | *foo&bar | yes | no}}\n{{#ifeq: a'b | a&#39;b | yes | no}}\n{{#ifeq: a'b | a&amp;#39;b | yes | no}}\n{{#ifeq: foo | Foo | *yes | *no}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifeq",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "PAGENAME",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": "*foo&bar",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " *foo&bar ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifeq",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " a'b ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " a",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "&#39;",
				"name": "mw-ext-ground mw-html-entity"
			},
			{
				"text": "b ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifeq",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " a'b ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " a",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "&amp;",
				"name": "mw-ext-ground mw-html-entity"
			},
			{
				"text": "#39;b ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifeq",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " foo ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " Foo ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " *yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " *no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#iferror",
		"wikitext": "{{#iferror: {{#expr: 1 + 2 }} | error | correct }}\n{{#iferror: {{#expr: 1 + X }} | error | correct }}\n{{#iferror: {{#expr: 1 + 2 }} | error }}\n{{#iferror: {{#expr: 1 + X }} | error }}\n{{#iferror: {{#expr: 1 + 2 }} }}\n{{#iferror: {{#expr: 1 + X }} }}empty",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#iferror",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "#expr",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": " 1 + 2 ",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " error ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " correct ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#iferror",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "#expr",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": " 1 + X ",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " error ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " correct ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#iferror",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "#expr",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": " 1 + 2 ",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " error ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#iferror",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "#expr",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": " 1 + X ",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " error ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#iferror",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "#expr",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": " 1 + 2 ",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#iferror",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "#expr",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": " 1 + X ",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#ifexpr",
		"wikitext": "{{#ifexpr: | yes | no}}\n{{#ifexpr: 1 > 0 | yes }}\n{{#ifexpr: 1 < 0 | yes }}empty\n{{#ifexpr: 1 > 0 | | no}}empty\n{{#ifexpr: 1 < 0 | | no}}\n{{#ifexpr: 1 > 0 }}empty",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexpr",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexpr",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1 > 0 ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexpr",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1 < 0 ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexpr",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1 > 0 ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexpr",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1 < 0 ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexpr",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1 > 0 ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Bug 22866: #ifexpr should evaluate \"-0\" as false",
		"wikitext": "{{#ifexpr: (-1)*0 | true | false }}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifexpr",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " (-1)*0 ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " true ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " false ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Templates: Parser functions don't strip whitespace from positional parameters",
		"wikitext": "{{#if: {{foo}}\n| no-pre-then\n| no-pre-else\n}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground bracket"
			},
			{
				"text": "foo",
				"name": "mw-template-ext-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no-pre-then",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no-pre-else",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#switch",
		"wikitext": "{{#switch:foo&bar|foo&amp;bar=yes|no}}\n{{#switch:foo&bar|fred=1|foo&amp;bar|g=yes|no}}\n{{#switch:foo&bar|fred=1|foo&amp;&#39;bar|g=yes|no}}\n{{#switch:foo|bar|baz=no|*default}}\n{{#switch:none|foo=1|bar=2|#default=no match|baz=3}}\n{{#switch:none|foo=1|bar=2|#default=ignored|baz=3|Second default}}\n{{#switch:|a&amp;#39;b}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "foo&bar",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "foo",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "&amp;",
				"name": "mw-ext-ground mw-html-entity"
			},
			{
				"text": "bar=yes",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "foo&bar",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "fred=1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "foo",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "&amp;",
				"name": "mw-ext-ground mw-html-entity"
			},
			{
				"text": "bar",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "g=yes",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "foo&bar",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "fred=1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "foo",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "&amp;&#39;",
				"name": "mw-ext-ground mw-html-entity"
			},
			{
				"text": "bar",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "g=yes",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "foo",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "bar",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "baz=no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "*default",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "none",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "foo=1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "bar=2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "#default=no match",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "baz=3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "none",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "foo=1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "bar=2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "#default=ignored",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "baz=3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Second default",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "a",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "&amp;",
				"name": "mw-ext-ground mw-html-entity"
			},
			{
				"text": "#39;b",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#switch #default should match next and not last named parameter",
		"wikitext": "<{{#switch: foo | #default | bar = DEF }}>\n<{{#switch: foo | #default | bar = DEF | baz = GHI }}>",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " foo ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " #default ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " bar = DEF ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " foo ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " #default ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " bar = DEF ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " baz = GHI ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#switch should not match #default as a prefix",
		"wikitext": "<{{#switch: foo | #defaultWTF? = This is crazy }}>\n<{{#switch: foo | #defaultWTF? | bar = This is crazy }}>",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " foo ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " #defaultWTF? = This is crazy ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " foo ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " #defaultWTF? ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " bar = This is crazy ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#switch Test php truthy",
		"wikitext": "{{#switch: 01 | 1 = yes | no}}\n{{#switch: 0 | -0 = yes | no}}\n{{#switch: foo | bar = yes | no}}\n{{#switch: foo | Foo = yes | no}}\n{{#switch: \"01\" | \"1\" = yes | no}}\n{{#switch: 1 | 02 | 01 = yes | no}}\n{{#switch: 1 | \"01\" | \"1\" = yes | no}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 01 ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1 = yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 0 ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " -0 = yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " foo ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " bar = yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " foo ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " Foo = yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " \"01\" ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " \"1\" = yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1 ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 02 ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 01 = yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#switch",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1 ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " \"01\" ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " \"1\" = yes ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " no",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Basic test",
		"wikitext": "==h1==\n===h1.1===\n==h2==\n===h2.1===\n====h2.1.1====\n===h2.2===\n====h2.2.1====\n====h2.2.2====\n==h3==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "h1",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "h1.1",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "h2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "h2.1",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "h2.1.1",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "h2.2",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "h2.2.1",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "h2.2.2",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "h3",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "HTML headings should get TOC entries with some empty properties",
		"wikitext": "==a==\n<h2>b</h2>\n<h3>c</h3>\n===d===\n<h2>e</h2>",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "h2",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "h2",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "h3",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "h3",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "d",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "h2",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "h2",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Literal html heading from template",
		"wikitext": "{{1x|\n<h2>hi</h2>\nho\n}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "h2",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "hi",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "h2",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "ho",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Duplicate headings should get unique anchors",
		"wikitext": "==a==\n==a==\n==b==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Templated sections (heading from template content)",
		"wikitext": "==a==\n{{Test}}",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Test",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Ensure headings with html tags get the right anchors",
		"wikitext": "==<span>x</span>==\n==<strike>y</strike>==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "x",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "strike",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "y",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "strike",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Ensure unallowed tag wrappers in headings get stripped",
		"wikitext": "==<div>b</div>==\n==<font>c</font>==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "font",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "font",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Ensure disallowed attributes are stripped, but dir attribute in a span is left behind",
		"wikitext": "==<span dir='ltr' title='x'>a</span>==\n==<span dir='rtl' title='x'>b</span>==\n==<i dir='rtl' title='ha'>c</i>==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "dir=",
				"name": "attributeName"
			},
			{
				"text": "'ltr'",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " title=",
				"name": "attributeName"
			},
			{
				"text": "'x'",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "dir=",
				"name": "attributeName"
			},
			{
				"text": "'rtl'",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " title=",
				"name": "attributeName"
			},
			{
				"text": "'x'",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "i ",
				"name": "tagName"
			},
			{
				"text": "dir=",
				"name": "attributeName"
			},
			{
				"text": "'rtl'",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " title=",
				"name": "attributeName"
			},
			{
				"text": "'ha'",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Ensure empty tags are stripped",
		"wikitext": "==<span><div></div></span>x==\n==<span dir='ltr'><i dir='ltr'></i></span>y==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "x",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "dir=",
				"name": "attributeName"
			},
			{
				"text": "'ltr'",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "i ",
				"name": "tagName"
			},
			{
				"text": "dir=",
				"name": "attributeName"
			},
			{
				"text": "'ltr'",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "y",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Ensure tags following empty tags are stripped",
		"wikitext": "==<div></div>x==\n==<abbr><abbr></abbr></abbr><abbr><abbr title=\"abbr title\">y</abbr></abbr>z==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "x",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "abbr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "abbr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "abbr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "abbr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "abbr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "abbr ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"abbr title\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "y",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "abbr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "abbr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "z",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Ensure comments in toc lines are stripped",
		"wikitext": "==hi<html><!--ho--></html>==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "hi<html>",
				"name": "mw-section"
			},
			{
				"text": "<!--ho-->",
				"name": "comment"
			},
			{
				"text": "</html>",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Handle links in heading content",
		"wikitext": "==[[Cat]]==\n==[[Dog]]s==\n==[[Cat|I love my ''cat'']]==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Cat",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Dog",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "s",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Cat",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "I love my ",
				"name": "mw-link-ground string"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "cat",
				"name": "mw-link-ground string mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Ensure headings with special chars get the right anchors",
		"wikitext": "===a=\n=''x''=",
		"nodes": [
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "==a",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "''x''",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Templated sections (heading from template arg)",
		"wikitext": "==a==\n{{1x|1=\n==b==\n}}",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "==b==",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Offsets in toc metadata should be unicode codepoints, not bytes or UCS-2",
		"wikitext": "==One 💩==\n==Two 💩==\n==Three 💩==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "One 💩",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Two 💩",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Three 💩",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Handle multi-part content transclusion blocks",
		"wikitext": "<div>\n{{1x|1=\n==foo==\n</div>\n}}\n==bar==",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "==foo==",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "bar",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Handle parser functions generating sections",
		"wikitext": "{{#if:1|<h2>foo</h2>|unused}}\n==bar==",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#if",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "h2",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "</",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "h2",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "unused",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "bar",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Handle top-level template args generating sections",
		"wikitext": "{{{foo|\n==tplarg==\n|abcd}}}",
		"nodes": [
			{
				"text": "{{{",
				"name": "brace"
			},
			{
				"text": "foo",
				"name": "variableName"
			},
			{
				"text": "|",
				"name": "mw-templatevariable-delimiter"
			},
			{
				"text": "==tplarg==",
				"name": "atom"
			},
			{
				"text": "|abcd",
				"name": "atom"
			},
			{
				"text": "}}}",
				"name": "brace"
			}
		]
	},
	{
		"desc": "Basic section headings",
		"wikitext": "==Headline 1==\nSome text\n\n==Headline 2==\nMore\n===Smaller headline===\nBlah blah",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Headline 1",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Headline 2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "Smaller headline",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section headings with TOC",
		"wikitext": "==Headline 1==\n===Subheadline 1===\n=====Skipping a level=====\n======Skipping a level======\n\n==Headline 2==\nSome text\n===Another headline===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Headline 1",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "Subheadline 1",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "=====",
				"name": "heading heading5"
			},
			{
				"text": "Skipping a level",
				"name": "mw-section"
			},
			{
				"text": "=====",
				"name": "heading"
			},
			{
				"text": "======",
				"name": "heading heading6"
			},
			{
				"text": "Skipping a level",
				"name": "mw-section"
			},
			{
				"text": "======",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Headline 2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "Another headline",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section headings with TOC and language conversion (T295187, T306862)",
		"wikitext": "==Headline 1==\n===Subheadline 1===\n==Headline 2==\nSome text\n===Another headline===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Headline 1",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "Subheadline 1",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Headline 2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "Another headline",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Section headings with TOC and language conversion disabled (T295187)",
		"wikitext": "==Headline 1==\n===Subheadline 1===\n==Headline 2==\nSome text\n===Another headline===\n__NOCONTENTCONVERT__",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Headline 1",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "Subheadline 1",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Headline 2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "Another headline",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "__NOCONTENTCONVERT__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "Section headings with TOC, language conversion rules, and displaytitle\n(T306862, T331316, T26072)",
		"wikitext": "<!--\n-->-{H|Foo=>en:Boo;Foo=>en-x-piglatin:Bob;}-<!--\n-->-{H|Bar=>en:Bat;Bar=>en-x-piglatin:Ball;}-<!--\n-->-{T|en:Foo;en-x-piglatin:Bar;}-<!--\n-->\nIntroduction.\n-{A|en:Do; en-x-piglatin:Re;}-\n== Foo ==\nFoo Do\n== Bar ==\nBar Re\n== -{Foo Bar}- ==",
		"nodes": [
			{
				"text": "<!--",
				"name": "comment"
			},
			{
				"text": "-->",
				"name": "comment"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "=>en:",
				"name": "mw-conversion-lang"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "=>en-x-piglatin:",
				"name": "mw-conversion-lang"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<!--",
				"name": "comment"
			},
			{
				"text": "-->",
				"name": "comment"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "=>en:",
				"name": "mw-conversion-lang"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "=>en-x-piglatin:",
				"name": "mw-conversion-lang"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<!--",
				"name": "comment"
			},
			{
				"text": "-->",
				"name": "comment"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "en:",
				"name": "mw-conversion-lang"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "en-x-piglatin:",
				"name": "mw-conversion-lang"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<!--",
				"name": "comment"
			},
			{
				"text": "-->",
				"name": "comment"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "A",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "en:",
				"name": "mw-conversion-lang"
			},
			{
				"text": "; ",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "en-x-piglatin:",
				"name": "mw-conversion-lang"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " Foo ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " Bar ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " ",
				"name": "mw-section"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "Foo Bar",
				"name": "mw-section"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": " ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "TOC anchors don't collide",
		"wikitext": "__FORCETOC__\n==Headline 2==\n==Headline==\n==Headline 2==\n==Headline==",
		"nodes": [
			{
				"text": "__FORCETOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Headline 2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Headline",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Headline 2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Headline",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Handling of sections up to level 6 and beyond",
		"wikitext": "=Level 1 Heading=\n==Level 2 Heading==\n===Level 3 Heading===\n====Level 4 Heading====\n=====Level 5 Heading=====\n======Level 6 Heading======\n=======Level 7 Heading=======\n========Level 8 Heading========\n=========Level 9 Heading=========\n==========Level 10 Heading==========",
		"nodes": [
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "Level 1 Heading",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Level 2 Heading",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "Level 3 Heading",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "Level 4 Heading",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "=====",
				"name": "heading heading5"
			},
			{
				"text": "Level 5 Heading",
				"name": "mw-section"
			},
			{
				"text": "=====",
				"name": "heading"
			},
			{
				"text": "======",
				"name": "heading heading6"
			},
			{
				"text": "Level 6 Heading",
				"name": "mw-section"
			},
			{
				"text": "======",
				"name": "heading"
			},
			{
				"text": "======",
				"name": "heading heading6"
			},
			{
				"text": "=Level 7 Heading=",
				"name": "mw-section"
			},
			{
				"text": "======",
				"name": "heading"
			},
			{
				"text": "======",
				"name": "heading heading6"
			},
			{
				"text": "==Level 8 Heading==",
				"name": "mw-section"
			},
			{
				"text": "======",
				"name": "heading"
			},
			{
				"text": "======",
				"name": "heading heading6"
			},
			{
				"text": "===Level 9 Heading===",
				"name": "mw-section"
			},
			{
				"text": "======",
				"name": "heading"
			},
			{
				"text": "======",
				"name": "heading heading6"
			},
			{
				"text": "====Level 10 Heading====",
				"name": "mw-section"
			},
			{
				"text": "======",
				"name": "heading"
			}
		]
	},
	{
		"desc": "TOC regression (T11764)",
		"wikitext": "==title 1==\n===title 1.1===\n====title 1.1.1====\n===title 1.2===\n==title 2==\n===title 2.1===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "title 1",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "title 1.1",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "title 1.1.1",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "title 1.2",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "title 2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "title 2.1",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "TOC for heading containing <span id=\"...\"></span> (T96153)",
		"wikitext": "__FORCETOC__\n==<span id=\"old-anchor\"></span>New title==",
		"nodes": [
			{
				"text": "__FORCETOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"old-anchor\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "New title",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "TOC with wgMaxTocLevel=3 (T8204)",
		"wikitext": "==title 1==\n===title 1.1===\n====title 1.1.1====\n===title 1.2===\n==title 2==\n===title 2.1===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "title 1",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "title 1.1",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "title 1.1.1",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "title 1.2",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "title 2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "title 2.1",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "TOC with wgMaxTocLevel=3 and two level four headings (T8204)",
		"wikitext": "==Section 1==\n===Section 1.1===\n====Section 1.1.1====\n====Section 1.1.1.1====\n==Section 2==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Section 1",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "Section 1.1",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "Section 1.1.1",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "Section 1.1.1.1",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Section 2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Resolving duplicate section names",
		"wikitext": "==Foo bar==\n==Foo bar==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Foo bar",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Foo bar",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Resolving duplicate section names with differing case (T12721)",
		"wikitext": "==Foo bar==\n==Foo Bar==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Foo bar",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Foo Bar",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Template with sections, __NOTOC__",
		"wikitext": "__NOTOC__\n==Section 0==\n{{sections}}\n==Section 4==",
		"nodes": [
			{
				"text": "__NOTOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Section 0",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "sections",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Section 4",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "T307691: show-toc flag: no sections, but __FORCETOC__",
		"wikitext": "__FORCETOC__",
		"nodes": [
			{
				"text": "__FORCETOC__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "T307691: show-toc flag: no sections, but __TOC__",
		"wikitext": "__TOC__",
		"nodes": [
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "T307691: show-toc flag: no sections, and __NOTOC__",
		"wikitext": "__NOTOC__",
		"nodes": [
			{
				"text": "__NOTOC__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "T307691: show-toc flag: not \"enough\" sections",
		"wikitext": "== One ==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " One ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "T352467: synthetic sections shouldn't count towards \"enough\" sections",
		"wikitext": "<div>\n==a==\n==b==\n</div>\n==c==",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "c",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "T307691: show-toc flag: not \"enough\" sections, but __FORCETOC__",
		"wikitext": "__FORCETOC__\n== One ==",
		"nodes": [
			{
				"text": "__FORCETOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " One ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "T307691: show-toc flag: not \"enough\" sections, but __TOC__",
		"wikitext": "== One ==\n__TOC__",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " One ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "T307691: show-toc flag: not \"enough\" sections, and __NOTOC__",
		"wikitext": "__NOTOC__\n== One ==",
		"nodes": [
			{
				"text": "__NOTOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " One ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "T307691: show-toc flag: \"enough\" sections",
		"wikitext": "== One ==\n=== Two ===\n== Three ==\n=== Four ===",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " One ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": " Two ",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " Three ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": " Four ",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "T307691: show-toc flag: \"enough\" sections and __FORCETOC__",
		"wikitext": "__FORCETOC__\n== One ==\n=== Two ===\n== Three ==\n=== Four ===",
		"nodes": [
			{
				"text": "__FORCETOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " One ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": " Two ",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " Three ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": " Four ",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "T307691: show-toc flag: \"enough\" sections and __NOTOC__",
		"wikitext": "__NOTOC__\n== One ==\n=== Two ===\n== Three ==\n=== Four ===",
		"nodes": [
			{
				"text": "__NOTOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " One ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": " Two ",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " Three ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": " Four ",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "__NOEDITSECTION__ keyword",
		"wikitext": "__NOEDITSECTION__\n==Section 1==\n==Section 2==",
		"nodes": [
			{
				"text": "__NOEDITSECTION__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Section 1",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Section 2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Link inside a section heading",
		"wikitext": "==Section with a [[Main Page|link]] in it==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Section with a ",
				"name": "mw-section"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": " in it",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "TOC regression (T14077)",
		"wikitext": "__TOC__\n==title 1==\n===title 1.1===\n==title 2==",
		"nodes": [
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "title 1",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "title 1.1",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "title 2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "__FORCETOC__ override",
		"wikitext": "__NEWSECTIONLINK__\n__FORCETOC__",
		"nodes": [
			{
				"text": "__NEWSECTIONLINK__",
				"name": "controlKeyword"
			},
			{
				"text": "__FORCETOC__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "T28375: TOC with italics",
		"wikitext": "__TOC__\n==''Lost'' episodes==",
		"nodes": [
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "''Lost'' episodes",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "T28375: TOC with bold",
		"wikitext": "__TOC__\n=='''should be bold''' then normal text==",
		"nodes": [
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "'''should be bold''' then normal text",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "T35845: Headings become cursive in TOC when they contain an image",
		"wikitext": "__TOC__\n==Image [[Image:foobar.jpg]]==",
		"nodes": [
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Image ",
				"name": "mw-section"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "T35845 (2): Headings become bold in TOC when they contain a blockquote",
		"wikitext": "__TOC__\n==<blockquote>Quote</blockquote>==",
		"nodes": [
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "Quote",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Unclosed tags in TOC",
		"wikitext": "__TOC__\n==Proof: 2 < 3==\n<small>Hanc marginis exiguitas non caperet.</small>\nQED",
		"nodes": [
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Proof: 2 < 3",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Multiple tags in TOC",
		"wikitext": "__TOC__\n==<i>Foo</i> <b>Bar</b>==\n\n==<i>Foo</i> <blockquote>Bar</blockquote>==",
		"nodes": [
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "Foo",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-section"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "Bar",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "Foo",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-section"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "Bar",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Tags with parameters in TOC",
		"wikitext": "__TOC__\n==<sup class=\"in-h2\">Hello</sup>==\n\n==<sup class=\"a > b\">Evilbye</sup>==",
		"nodes": [
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "sup ",
				"name": "tagName"
			},
			{
				"text": "class=",
				"name": "attributeName"
			},
			{
				"text": "\"in-h2\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "Hello",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "sup",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "sup ",
				"name": "tagName"
			},
			{
				"text": "class=",
				"name": "attributeName"
			},
			{
				"text": "\"a ",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " b\">Evilbye",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "sup",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "span tags with directionality in TOC",
		"wikitext": "__TOC__\n==<span dir=\"ltr\">C++</span>==\n\n==<span dir=\"rtl\">זבנג!</span>==\n\n==<span style=\"font-style: italic\" dir=\"ltr\" title=\"hello\">Attributes other than dir</span>==",
		"nodes": [
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "dir=",
				"name": "attributeName"
			},
			{
				"text": "\"ltr\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "C++",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "dir=",
				"name": "attributeName"
			},
			{
				"text": "\"rtl\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "זבנג!",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"font-style: italic\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " dir=",
				"name": "attributeName"
			},
			{
				"text": "\"ltr\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " title=",
				"name": "attributeName"
			},
			{
				"text": "\"hello\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "Attributes other than dir",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "T74884: bdi element in ToC",
		"wikitext": "__TOC__\n==<bdi>test</bdi>==",
		"nodes": [
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "bdi",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "test",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "bdi",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "T35715: s/strike element in ToC",
		"wikitext": "__TOC__\n==<s>test</s> test <strike>test</strike>==",
		"nodes": [
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "test",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " test ",
				"name": "mw-section"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "strike",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "test",
				"name": "mw-section"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "strike",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "T198618: style element in ToC",
		"wikitext": "__TOC__\n==<style>.foo {}</style>Style<style>.bar {}</style>==",
		"nodes": [
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<style>.foo {}</style>Style<style>.bar {}</style>",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "T198618: script element in ToC",
		"wikitext": "__TOC__\n==<html><script>alert(1);</script></html>Script<html><script>alert(1);</script></html>==",
		"nodes": [
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<html><script>alert(1);</script></html>Script<html><script>alert(1);</script></html>",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Empty <p> tag in TOC, removed by Sanitizer (T92892)",
		"wikitext": "__TOC__\n==x==",
		"nodes": [
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "x",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Disable TOC",
		"wikitext": "Lead\n==Section 1==\n==Section 2==\n==Section 3==\n==Section 4==\n==Section 5==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Section 1",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Section 2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Section 3",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Section 4",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Section 5",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Short headings with trailing space should match behavior of Parser::doHeadings (T21910)",
		"wikitext": "=== \nThe line above must have a trailing space!\n=== <!--\n--> <!-- -->\nBut just in case it doesn't...",
		"nodes": [
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "=",
				"name": "mw-section"
			},
			{
				"text": "= ",
				"name": "heading"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "=",
				"name": "mw-section"
			},
			{
				"text": "= ",
				"name": "heading"
			},
			{
				"text": "<!--",
				"name": "comment"
			},
			{
				"text": "-->",
				"name": "comment"
			},
			{
				"text": "<!-- -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Header with special characters (T27462)",
		"wikitext": "The tooltips shall not show entities to the user (ie. be double escaped)\n\n==text > text==\nsection 1\n\n==text < text==\nsection 2\n\n==text & text==\nsection 3\n\n==text ' text==\nsection 4\n\n==text \" text==\nsection 5",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "text > text",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "text < text",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "text & text",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "text ' text",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "text \" text",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Header with space, plus and underscore as entity",
		"wikitext": "Id should not contain + for spaces\n\n==Space between Text==\nsection 1\n\n==Space-Entity&#32;between&#32;Text==\nsection 2\n\n==Plus+between+Text==\nsection 3\n\n==Plus-Entity&#43;between&#43;Text==\nsection 4\n\n==Underscore_between_Text==\nsection 5\n\n==Underscore-Entity&#95;between&#95;Text==\nsection 6\n\n[[#Space between Text]]\n[[#Space-Entity&#32;between&#32;Text]]\n[[#Plus+between+Text]]\n[[#Plus-Entity&#43;between&#43;Text]]\n[[#Underscore_between_Text]]\n[[#Underscore-Entity&#95;between&#95;Text]]",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Space between Text",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Space-Entity",
				"name": "mw-section"
			},
			{
				"text": "&#32;",
				"name": "mw-html-entity"
			},
			{
				"text": "between",
				"name": "mw-section"
			},
			{
				"text": "&#32;",
				"name": "mw-html-entity"
			},
			{
				"text": "Text",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Plus+between+Text",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Plus-Entity",
				"name": "mw-section"
			},
			{
				"text": "&#43;",
				"name": "mw-html-entity"
			},
			{
				"text": "between",
				"name": "mw-section"
			},
			{
				"text": "&#43;",
				"name": "mw-html-entity"
			},
			{
				"text": "Text",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Underscore_between_Text",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Underscore-Entity",
				"name": "mw-section"
			},
			{
				"text": "&#95;",
				"name": "mw-html-entity"
			},
			{
				"text": "between",
				"name": "mw-section"
			},
			{
				"text": "&#95;",
				"name": "mw-html-entity"
			},
			{
				"text": "Text",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Space between Text",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Space-Entity",
				"name": "mw-link-ground className"
			},
			{
				"text": "&#32;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "between",
				"name": "mw-link-ground className"
			},
			{
				"text": "&#32;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "Text",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Plus+between+Text",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Plus-Entity",
				"name": "mw-link-ground className"
			},
			{
				"text": "&#43;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "between",
				"name": "mw-link-ground className"
			},
			{
				"text": "&#43;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "Text",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Underscore_between_Text",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Underscore-Entity",
				"name": "mw-link-ground className"
			},
			{
				"text": "&#95;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "between",
				"name": "mw-link-ground className"
			},
			{
				"text": "&#95;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "Text",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Headers with excess '=' characters\n(Are similar tests necessary beyond the 1st level?)",
		"wikitext": "=foo==\n==foo=\n=''italic'' heading==\n==''italic'' heading=",
		"nodes": [
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "foo=",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "=foo",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "''italic'' heading=",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "=''italic'' heading",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			}
		]
	},
	{
		"desc": "HTML headers vs TOC (T25393)\n(__NOEDITSECTION__ for clearer output, doesn't matter here)",
		"wikitext": "<h1>Header 1</h1>\n==Header 1.1==\n==Header 1.2==\n\n<h1>Header 2\n</h1>\n==Header 2.1==\n==Header 2.2==\n__NOEDITSECTION__",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "h1",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "h1",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Header 1.1",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Header 1.2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "h1",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "h1",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Header 2.1",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Header 2.2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "__NOEDITSECTION__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "Out-of-order TOC heading levels",
		"wikitext": "==2==\n======6======\n===3===\n=1=\n=====5=====\n==2==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "======",
				"name": "heading heading6"
			},
			{
				"text": "6",
				"name": "mw-section"
			},
			{
				"text": "======",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "3",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "1",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "=====",
				"name": "heading heading5"
			},
			{
				"text": "5",
				"name": "mw-section"
			},
			{
				"text": "=====",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "2",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "TOC with HTML entities which are not wikitext entities (T355386)",
		"wikitext": "__TOC__\n== F&GT ==\nTest",
		"nodes": [
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " F&GT ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "TOC with french spacing (T324763)",
		"wikitext": "__TOC__\n== Renommer la page « Informatique durable » en « Numérique responsable » ? ==\nOui.",
		"nodes": [
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " Renommer la page « Informatique durable » en « Numérique responsable » ? ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "TOC data when heading content is equal to an id already set on the page",
		"wikitext": "<span id=\"hiho\">hiho</span>\n=== hiho ===",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"hiho\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": " hiho ",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			}
		]
	},
	{
		"desc": "TOC data when heading already has an id",
		"wikitext": "<h3 id=\"asdf\">odd</h3>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "h3 ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"asdf\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "h3",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Extra newlines followed by heading",
		"wikitext": "a\n\n\n=b=\n[[a]]\n\n\n=b=",
		"nodes": [
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "a",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Extra newlines between heading and content are swallowed (Parsoid does not)",
		"wikitext": "=b=\n\n\n\n[[a]]",
		"nodes": [
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "b",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "a",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Heading with line break in nowiki",
		"wikitext": "==A <nowiki>B\nC</nowiki>==",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "B",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "C",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Heading with nonbreaking space in prefix/suffix (T235684)",
		"wikitext": "== &nbsp; A &nbsp; B &nbsp; ==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " ",
				"name": "mw-section"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": " A ",
				"name": "mw-section"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": " B ",
				"name": "mw-section"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": " ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Heading with literal wikitext - the wikitext is not parsed in section edit link tooltip",
		"wikitext": "== <nowiki>{{PAGENAME}}</nowiki> ==\n== &#123;&#123;PAGENAME}} ==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " ",
				"name": "mw-section"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "{{PAGENAME}}",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": " ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " ",
				"name": "mw-section"
			},
			{
				"text": "&#123;&#123;",
				"name": "mw-html-entity"
			},
			{
				"text": "PAGENAME}} ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "T8563: Edit link generation for section shown by <includeonly>",
		"wikitext": "{{includeonly section}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "includeonly section",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T8563: Edit link generation for section suppressed by <includeonly>",
		"wikitext": "<includeonly>\n==Includeonly section==\n</includeonly>\n==Section 1==",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Includeonly section",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Section 1",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Fuzz testing: Parser14",
		"wikitext": "==onmouseover===\nhttp://__TOC__",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "onmouseover=",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "__TOC__",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "Fuzz testing: Parser14-table",
		"wikitext": "==a==\n{| STYLE=__TOC__",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "a",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "STYLE=",
				"name": "definitionOperator"
			},
			{
				"text": "__TOC__",
				"name": "mw-table-definition-value"
			}
		]
	},
	{
		"desc": "Inclusion of !userCanEdit() content",
		"wikitext": "{{MediaWiki:Fake}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "MediaWiki:Fake",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Morwen/13: Unclosed link followed by heading",
		"wikitext": "[[link\n==heading==",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "link",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "heading",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "HHP2.1: Heuristics for headings in preprocessor parenthetical structures",
		"wikitext": "{{foo|\n=heading=",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "foo",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "=heading=",
				"name": "mw-template-ground attributeValue"
			}
		]
	},
	{
		"desc": "HHP2.2: Heuristics for headings in preprocessor parenthetical structures",
		"wikitext": "{{foo|\n==heading==",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "foo",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "==heading==",
				"name": "mw-template-ground attributeValue"
			}
		]
	},
	{
		"desc": "nowiki inside link inside heading (T20295)",
		"wikitext": "==[[foo|x<nowiki>y</nowiki>z]]==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "x",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "y",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "z",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Decoding of HTML entities in headings and links for IDs and link fragments (T103714)",
		"wikitext": "==A&B&amp;C&amp;amp;D&amp;amp;amp;E==\n[[#A&B&amp;C&amp;amp;D&amp;amp;amp;E]]",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "A&B",
				"name": "mw-section"
			},
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "C",
				"name": "mw-section"
			},
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "amp;D",
				"name": "mw-section"
			},
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "amp;amp;E",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "A&B",
				"name": "mw-link-ground className"
			},
			{
				"text": "&amp;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "C",
				"name": "mw-link-ground className"
			},
			{
				"text": "&amp;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "amp;D",
				"name": "mw-link-ground className"
			},
			{
				"text": "&amp;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "amp;amp;E",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)",
		"wikitext": "==A&B&amp;C&amp;amp;D&amp;amp;amp;E==\n[[#A&B&amp;C&amp;amp;D&amp;amp;amp;E]]",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "A&B",
				"name": "mw-section"
			},
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "C",
				"name": "mw-section"
			},
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "amp;D",
				"name": "mw-section"
			},
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "amp;amp;E",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "A&B",
				"name": "mw-link-ground className"
			},
			{
				"text": "&amp;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "C",
				"name": "mw-link-ground className"
			},
			{
				"text": "&amp;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "amp;D",
				"name": "mw-link-ground className"
			},
			{
				"text": "&amp;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "amp;amp;E",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "HTML5 ids: fallback to legacy",
		"wikitext": "==Foo bar==\n\n==foo Bar==\n\n==Тест==\n\n==Тест==\n\n==тест==\n\n==Hey < # \" > % : '==\n[[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # \" > % : ']]\n\n{{anchorencode:💩}} <span id=\"{{anchorencode:💩}}\"></span>\n\n<!-- These two links should produce identical HTML -->\n[[#啤酒]] [[#%E5%95%A4%E9%85%92]]",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Foo bar",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "foo Bar",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Тест",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Тест",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "тест",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Hey < # \" > % : '",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Foo bar",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "foo Bar",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Тест",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "тест",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Hey < # \" > % : '",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "anchorencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "💩",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "anchorencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "💩",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<!-- These two links should produce identical HTML -->",
				"name": "comment"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "啤酒",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "%E5%95%A4%E9%85%92",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "HTML5 ids: legacy with a fallback to modern",
		"wikitext": "==Foo bar==\n\n==foo Bar==\n\n==Тест==\n\n==Тест==\n\n==тест==\n\n==Hey < # \" > % : '==\n[[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # \" > % : ']]\n\n{{anchorencode:💩}} <span id=\"{{anchorencode:💩}}\"></span>\n\n<!-- These two links should produce identical HTML -->\n[[#啤酒]] [[#%E5%95%A4%E9%85%92]]",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Foo bar",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "foo Bar",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Тест",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Тест",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "тест",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Hey < # \" > % : '",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Foo bar",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "foo Bar",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Тест",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "тест",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Hey < # \" > % : '",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "anchorencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "💩",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "anchorencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "💩",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<!-- These two links should produce identical HTML -->",
				"name": "comment"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "啤酒",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "%E5%95%A4%E9%85%92",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "HTML5 ids: no legacy",
		"wikitext": "==Foo bar==\n\n==foo Bar==\n\n==Тест==\n\n==Тест==\n\n==тест==\n\n==Hey < # \" > % : '==\n[[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # \" > % : ']]\n\n{{anchorencode:💩}} <span id=\"{{anchorencode:💩}}\"></span>\n\n<!-- These two links should produce identical HTML -->\n[[#啤酒]] [[#%E5%95%A4%E9%85%92]]",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Foo bar",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "foo Bar",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Тест",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Тест",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "тест",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Hey < # \" > % : '",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Foo bar",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "foo Bar",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Тест",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "тест",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Hey < # \" > % : '",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "anchorencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "💩",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "id=",
				"name": "attributeName"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "anchorencode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "💩",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<!-- These two links should produce identical HTML -->",
				"name": "comment"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "啤酒",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "%E5%95%A4%E9%85%92",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T90902: Normalize weird characters in section IDs",
		"wikitext": "==Foo&nbsp;bar==\n[[#Foo&nbsp;bar]]",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Foo",
				"name": "mw-section"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "bar",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground className"
			},
			{
				"text": "&nbsp;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "bar",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "mw-heading wrapper edge cases",
		"wikitext": "==Normal heading!==\n\n<h2>HTML heading!</h2>\n\n<h2 style=\"border: 1px solid green; background: lightgreen; padding: 5px; font-size: 1.5em;\">HTML heading with attributes!</h2>\n\n<div class=\"mw-heading mw-heading2\">\n==Normal heading with existing wrapper!==\n</div>",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Normal heading!",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "h2",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "h2",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "h2 ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"border: 1px solid green; background: lightgreen; padding: 5px; font-size: 1.5em;\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "h2",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "class=",
				"name": "attributeName"
			},
			{
				"text": "\"mw-heading mw-heading2\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "Normal heading with existing wrapper!",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T365413: Headings with dollar signs",
		"wikitext": "==$text==\n\n==$ text==\n\n==text $text==\n\n==\\$text==\n\n==$$text==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "$text",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "$ text",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "text $text",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "\\$text",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "$$text",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "T368334: Headings from template titles that would need uri encoding",
		"wikitext": "{{With a section?}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "With a section?",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Reset section numbering per template",
		"wikitext": "=== out ===\n123\n\n{{with one}}\n\n=== out 2 ===\n456\n\n{{with two}}\n\n{{with one}}",
		"nodes": [
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": " out ",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "with one",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": " out 2 ",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "with two",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "with one",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Nested section numbering",
		"wikitext": "=== out ===\n123\n\n{{with heading nesting}}",
		"nodes": [
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": " out ",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "with heading nesting",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Sections follow template redirects",
		"wikitext": "{{with redirect}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "with redirect",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Editable headings can only have trailing comments and whitespace",
		"wikitext": "==== test ====\nyup\n\n==== hi ho ====<noinclude>\nnope\n</noinclude>\n\n==== test 2 ====\nanother yup\n\n<!-- well -->==== ha ha ====\nback to nope\n\n==== he he ====  <!-- but this is ok -->\nsee",
		"nodes": [
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": " test ",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": " test 2 ",
				"name": "mw-section"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "<!-- well -->",
				"name": "comment"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": " he he ",
				"name": "mw-section"
			},
			{
				"text": "====  ",
				"name": "heading"
			},
			{
				"text": "<!-- but this is ok -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "T368722: Empty headings",
		"wikitext": "== ==",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "imagemap test 1",
		"wikitext": "<imagemap>\nImage:Foobar.jpg\n</imagemap>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "imagemap test 2",
		"wikitext": "<imagemap>\nFile:Foobar.jpg\n\npoly 10.1 10.9 10 30 -30 15 [[Main Page]]\n</imagemap>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-exttag"
			},
			{
				"text": "poly 10.1 10.9 10 30 -30 15 [[Main Page]]",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "imagemap test 3",
		"wikitext": "<imagemap>\nFile:Foobar.jpg|150px|alt=Alt text\ndefault [[Main Page|Go to main page]]\n</imagemap>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "File:Foobar.jpg|150px|alt=Alt text",
				"name": "mw-exttag"
			},
			{
				"text": "default [[Main Page|Go to main page]]",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "Empty imagemap",
		"wikitext": "<imagemap>\n</imagemap>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "Invalid image title",
		"wikitext": "<imagemap>\n[[x|xx]]]]\n</imagemap>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "[[x|xx]]]]",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "Image does not exist",
		"wikitext": "<imagemap>\nFile:Nopenopenope.jpg\n</imagemap>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "File:Nopenopenope.jpg",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "Invalid description type",
		"wikitext": "<imagemap>\nImage:Foobar.jpg\ndesc nopenopenope\n</imagemap>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-exttag"
			},
			{
				"text": "desc nopenopenope",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "Empty description type",
		"wikitext": "<imagemap>\nImage:Foobar.jpg\ndesc\n</imagemap>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-exttag"
			},
			{
				"text": "desc",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "Non-default description type",
		"wikitext": "<imagemap>\nImage:Foobar.jpg\ndesc top-left\n</imagemap>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-exttag"
			},
			{
				"text": "desc top-left",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "None description type",
		"wikitext": "<imagemap>\nImage:Foobar.jpg\ndesc none\n</imagemap>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-exttag"
			},
			{
				"text": "desc none",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "No link title",
		"wikitext": "<imagemap>\nFile:Foobar.jpg\n123\n</imagemap>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-exttag"
			},
			{
				"text": "123",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "Invalid link title",
		"wikitext": "<imagemap>\nFile:Foobar.jpg\n[[<]]\n</imagemap>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-exttag"
			},
			{
				"text": "[[<]]",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "Link with wikitext syntax in content",
		"wikitext": "<imagemap>\nFile:Foobar.jpg|150px|alt=Alt text\ndefault [[Main Page|Go to ''main page'']]\n</imagemap>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "File:Foobar.jpg|150px|alt=Alt text",
				"name": "mw-exttag"
			},
			{
				"text": "default [[Main Page|Go to ''main page'']]",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "File with link= option",
		"wikitext": "<imagemap>\nFile:Foobar.jpg|link=|Hi ho\n</imagemap>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "File:Foobar.jpg|link=|Hi ho",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "File with <br> in caption (T113791)",
		"wikitext": "<imagemap>\nFile:Foobar.jpg|thumb|a<br>b\n</imagemap>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "File:Foobar.jpg|thumb|a<br>b",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "File with <br /> in caption (T113791)",
		"wikitext": "<imagemap>\nFile:Foobar.jpg|thumb|a<br />b\n</imagemap>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "File:Foobar.jpg|thumb|a<br />b",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "Imagemap without file namespace",
		"wikitext": "<imagemap>\nFoobar.jpg\n</imagemap>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "Foobar.jpg",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "Imagemap with external link",
		"wikitext": "<imagemap>\nFile:Foobar.jpg\ndefault [http://google.com]\n</imagemap>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-exttag"
			},
			{
				"text": "default [http://google.com]",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "Imagemap with interlanguage link",
		"wikitext": "[[es:Lalala]]\n\n<imagemap>\nFile:Foobar.jpg\ndefault [[es:Lalala]]\n</imagemap>",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Lalala",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-exttag"
			},
			{
				"text": "default [[es:Lalala]]",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "Imagemap with category link",
		"wikitext": "[[category:Lalala]]\n\n<imagemap>\nFile:Foobar.jpg\ndefault [[category:Lalala]]\n</imagemap>",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "category:Lalala",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-exttag"
			},
			{
				"text": "default [[category:Lalala]]",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			},
			{
				"text": "imagemap",
				"name": "mw-exttag-name mw-ext-imagemap"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-imagemap"
			}
		]
	},
	{
		"desc": "Preformatted text",
		"wikitext": " This is some\n Preformatted text\n With ''italic''\n And '''bold'''\n And a [[Main Page|link]]",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "italic",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bold",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Tabs don't trigger preformatted text",
		"wikitext": "\tThis is not\n\t preformatted text.\n This is preformatted text.\n \tSo is this.",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "Space before tab needs nowiki pre protection",
		"wikitext": "a",
		"nodes": []
	},
	{
		"desc": "Indent preformatting with inline content",
		"wikitext": " a\n ''b''",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "b",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "<pre> with <nowiki> inside (compatibility with 1.6 and earlier)",
		"wikitext": "<pre><nowiki>\n<b>\n<cite>\n<em>\n</nowiki></pre>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "<nowiki>",
				"name": "mw-tag-pre"
			},
			{
				"text": "<b>",
				"name": "mw-tag-pre"
			},
			{
				"text": "<cite>",
				"name": "mw-tag-pre"
			},
			{
				"text": "<em>",
				"name": "mw-tag-pre"
			},
			{
				"text": "</nowiki>",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "Regression with preformatted in <center>",
		"wikitext": "<center>\n Blah\n</center>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "center",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "center",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T54763: Preformatted in <blockquote>",
		"wikitext": "<blockquote>\n Blah\n{|\n|\n indented cell (no pre-wrapping!)\n|}\n</blockquote>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>",
		"wikitext": " {{1x|}}",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>",
		"wikitext": " {{1x|\nfoo}}",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Indent-Pre: 1c: Wrapping should be based on expanded content",
		"wikitext": " {{1x|a\nb}}",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Indent-Pre: 1d: Wrapping should be based on expanded content",
		"wikitext": " {{1x|a\nb\nc\n d\ne\n}}",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "c",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": " d",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "e",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Indent-Pre: 1e. Wrapping should be based on expanded content",
		"wikitext": "{{1x| foo}}\n\n{{1x| foo}}{{1x| bar}}\n\n{{1x| foo}}\n{{1x| bar}}\n\n{{1x|<!--cmt--> foo}}\n\n<!--cmt-->{{1x| foo}}\n\n{{1x|{{1x| }}bar}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "| ",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "| ",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "| ",
				"name": "mw-template-ground separator"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "| ",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "| ",
				"name": "mw-template-ground separator"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<!--cmt-->",
				"name": "mw-template-ground comment"
			},
			{
				"text": " foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<!--cmt-->",
				"name": "comment"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "| ",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "| ",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates: Indent-Pre: 1f: Wrapping should be based on expanded content",
		"wikitext": "{{1x| }}a\n\n{{1x|\n }}a\n\n{{1x|\n b}}\n\n{{1x|a\n }}b\n\n{{1x|a\n}} b",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "| ",
				"name": "mw-template-ground separator"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": " ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": " b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": " ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Off-by-1 DSR values: Regression test for indent-pre usages",
		"wikitext": " {{1x|\n}} ''{{1x|\n}} X'' {{1x|<span></span>\n}} Y",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": " ",
				"name": "mw-em"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Ensure DSR values for mw:DisplaySpace spans are computed correctly",
		"wikitext": " x\n y :)",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "pwrap test",
		"wikitext": "{{T1}}{{T1}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "T1",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "T1",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "1a. Indent-Pre and Comments",
		"wikitext": " a\n<!--a-->\nc",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<!--a-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "1b. Indent-Pre and Comments",
		"wikitext": " a\n <!--a-->\nc",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<!--a-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "1c. Indent-Pre and Comments",
		"wikitext": "<!--a-->  a\n\n <!--a--> a",
		"nodes": [
			{
				"text": "<!--a-->",
				"name": "comment"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<!--a-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "1d. Indent-Pre and Comments\n(Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)",
		"wikitext": "<!--a--> a\n\n <!--b-->b",
		"nodes": [
			{
				"text": "<!--a-->",
				"name": "comment"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<!--b-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "2a. Indent-Pre and tables",
		"wikitext": " {|\n |-\n !h1!!h2\n |foo||bar\n |}",
		"nodes": [
			{
				"text": " {|",
				"name": "null"
			},
			{
				"text": " |-",
				"name": "typeOperator"
			},
			{
				"text": " !",
				"name": "typeOperator"
			},
			{
				"text": "h1",
				"name": "mw-strong"
			},
			{
				"text": "!!",
				"name": "typeOperator"
			},
			{
				"text": "h2",
				"name": "mw-strong"
			},
			{
				"text": " |",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": " |}",
				"name": "null"
			}
		]
	},
	{
		"desc": "2b. Indent-Pre and tables",
		"wikitext": "  {|\n |-\n|foo\n|}",
		"nodes": [
			{
				"text": "  {|",
				"name": "null"
			},
			{
				"text": " |-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "2c. Indent-Pre and tables (T44252)",
		"wikitext": "{|\n |+foo\n !  |bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": " |+",
				"name": "typeOperator"
			},
			{
				"text": "foo",
				"name": "mw-table-caption"
			},
			{
				"text": " !  |",
				"name": "typeOperator"
			},
			{
				"text": "bar",
				"name": "mw-strong"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "2d. Indent-Pre and tables",
		"wikitext": " a\n {|\n |b\n |}",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " {|",
				"name": "null"
			},
			{
				"text": " |",
				"name": "typeOperator"
			},
			{
				"text": " |}",
				"name": "null"
			}
		]
	},
	{
		"desc": "2e. Indent-Pre and table-line syntax",
		"wikitext": " a\n | b\n | c",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "2f. Indent-pre started by table-line syntax",
		"wikitext": "a\n | b\n | c",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "2g. Indented table markup mixed with indented pre content (proposed in T8200)",
		"wikitext": " <table>\n <tr>\n <td>\n Text that should be rendered preformatted\n </td>\n </tr>\n </table>",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "2h. Indent pre in tables",
		"wikitext": "{|\n !\n foo\n !\n bar\n |-\n |\n baz\n {{!}}\n bam\n |}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": " !",
				"name": "typeOperator"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": " !",
				"name": "typeOperator"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "bar",
				"name": "mw-strong"
			},
			{
				"text": " |-",
				"name": "typeOperator"
			},
			{
				"text": " |",
				"name": "typeOperator"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " |}",
				"name": "null"
			}
		]
	},
	{
		"desc": "3a. Indent-Pre and block tags (single-line html)",
		"wikitext": " a <p> foo </p>\n b <div> foo </div>\n c <blockquote> foo </blockquote>\n <span> foo </span>",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "3b. Indent-Pre and block tags (multi-line html)",
		"wikitext": " a <span>foo</span>\n<!-- comment --> b <div> foo </div>",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<!-- comment -->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "3c. Indent-Pre and block tags (pre-content on separate line)",
		"wikitext": "<p>\n foo\n</p>\n\n<div>\n foo\n</div>\n\n<center>\n foo\n</center>\n\n<blockquote>\n foo\n</blockquote>\n\n<blockquote>\n<pre>\nfoo\n</pre>\n</blockquote>\n\n<table><tr><td>\n foo\n</td></tr></table>\n\n<ul><li>\n  foo\n</li></ul>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "center",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "center",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "foo",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "ul",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "5. Indent-Pre and html pre",
		"wikitext": " <pre class=\"123\">hi</pre>",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre ",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": "class=",
				"name": "mw-exttag-attribute mw-ext-pre"
			},
			{
				"text": "\"123\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "hi",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "Serializing indent pre at sol",
		"wikitext": " hi",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "Render paragraphs when indent-pre is suppressed in blocklevels",
		"wikitext": "<blockquote>\n foo\n\n bar\n</blockquote>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "4. Multiple spaces at start-of-line",
		"wikitext": "    <p> foo </p>\n    foo\n\t{|\n|foo\n|}",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "5a. White-space in indent-pre",
		"wikitext": " a<br />\n \n b",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "br ",
				"name": "tagName"
			},
			{
				"text": "/>",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "5b. White-space in indent-pre",
		"wikitext": " a\n \n b\n \n \n c",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "5c. White-space in indent-pre",
		"wikitext": " ''a''\n  ''b''\n   ''c''",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "a",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "b",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "c",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content",
		"wikitext": " a\n \n <!-- continue -->\n b\n\n c\n \nd",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<!-- continue -->",
				"name": "comment"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "7a. Indent-pre and category links",
		"wikitext": " [[Category:foo]] <!-- No pre-wrapping -->\n{{1x| [[Category:foo]]}} <!-- No pre-wrapping -->",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<!-- No pre-wrapping -->",
				"name": "comment"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "| ",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Category:foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<!-- No pre-wrapping -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "7b. Indent-pre and category links",
		"wikitext": " [[Category:foo]] a\n [[Category:foo]] {{1x|b}}",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Indent-Pre: Newlines in comments shouldn't affect sol state",
		"wikitext": "a <!--\nfoo\n--> b",
		"nodes": [
			{
				"text": "<!--",
				"name": "comment"
			},
			{
				"text": "foo",
				"name": "comment"
			},
			{
				"text": "-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Indent pre with leading colon",
		"wikitext": " :foo",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "Indent-Pre regression test: Trailing whitespace after sol-transparent content",
		"wikitext": "[[Category:Foo]]   \n[[Category:Bar]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Preserving leading whitespace in indent-pre suppressing contexts",
		"wikitext": "<ol>\n<li>\n foo\n bar\n</li>\n</ol>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "ol",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "li",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "ol",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Page status indicators: Empty name is invalid",
		"wikitext": "<indicator name=\" \"></indicator>\n<indicator></indicator>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\" \"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": "></",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "></",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			}
		]
	},
	{
		"desc": "Page status indicators: Weird syntaxes that are okay",
		"wikitext": "<indicator name=\"empty\" />\n<indicator name=\"name\"></indicator>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"empty\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"name\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": "></",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			}
		]
	},
	{
		"desc": "Page status indicators: Stress test",
		"wikitext": "<indicator name=\"01\">hello world</indicator>\n<indicator name=\"02\">[[Main Page]]</indicator>\n<indicator name=\"03\">[[File:Foobar.jpg|25px|link=]]</indicator>\n<indicator name=\"04\">[[File:Foobar.jpg|25px]]</indicator>\n<indicator name=\"05\">*foo\n*bar</indicator>\n<indicator name=\"06\"><nowiki>foo</nowiki></indicator>\n<indicator name=\"07\"> Preformatted</indicator>\n<indicator name=\"08\"><div>Broken tag</indicator>\n<indicator name=\"09\">{| class=wikitable\n|cell\n|}</indicator>\n<indicator name=\"10\">Two\n\nparagraphs</indicator>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"01\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "hello world",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"02\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "[[Main Page]]",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"03\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "[[File:Foobar.jpg|25px|link=]]",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"04\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "[[File:Foobar.jpg|25px]]",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"05\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "*foo",
				"name": "mw-exttag"
			},
			{
				"text": "*bar",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"06\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "<nowiki>foo</nowiki>",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"07\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": " Preformatted",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"08\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "<div>Broken tag",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"09\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "{| class=wikitable",
				"name": "mw-exttag"
			},
			{
				"text": "|cell",
				"name": "mw-exttag"
			},
			{
				"text": "|}",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"10\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "Two",
				"name": "mw-exttag"
			},
			{
				"text": "paragraphs",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			}
		]
	},
	{
		"desc": "Decoding of HTML entities in indicator names for IDs (T104196)",
		"wikitext": "<indicator name=\"1&2&amp;3&amp;amp;4&amp;amp;amp;5\">Indicator</indicator>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"1&2&amp;3&amp;amp;4&amp;amp;amp;5\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "Indicator",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			}
		]
	},
	{
		"desc": "Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)",
		"wikitext": "<indicator name=\"1&2&3&amp;amp;4&amp;amp;amp;5\">Indicator</indicator>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"1&2&3&amp;amp;4&amp;amp;amp;5\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "Indicator",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			}
		]
	},
	{
		"desc": "Indicators with duplicate names: Last one wins",
		"wikitext": "<indicator name=\"x\">foo</indicator>\n<indicator name=\"x\">bar</indicator>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"x\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "foo",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"x\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "bar",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			}
		]
	},
	{
		"desc": "Templates where an indicator is the leading content (1)",
		"wikitext": "abcd\n{{1x|<indicator name=\"x\">foo</indicator>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-template-ground mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-template-ground mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"x\"",
				"name": "mw-template-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-template-ground mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates where an indicator is the leading content (2)",
		"wikitext": "abcd\n<indicator name=\"x\">bar</indicator>\n{{1x|<indicator name=\"x\">foo</indicator>}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"x\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "bar",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-template-ground mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-template-ground mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"x\"",
				"name": "mw-template-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-template-ground mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates where an indicator is not the leading content (1)",
		"wikitext": "abcd\n{{1x|efgh<indicator name=\"x\">foo</indicator>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "efgh",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-template-ground mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-template-ground mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"x\"",
				"name": "mw-template-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-template-ground mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templates where an indicator is not the leading content (2)",
		"wikitext": "abcd\n<indicator name=\"x\">bar</indicator>\n{{1x|efgh<indicator name=\"x\">foo</indicator>}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"x\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "bar",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "efgh",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-template-ground mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-template-ground mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"x\"",
				"name": "mw-template-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-template-ground mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Indicator in fosterable position should not dirty-diff in selser mode",
		"wikitext": "{|\n<indicator name='x'>foo</indicator>\n|x\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "'x'",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "foo",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Indicator with comments should not be <p>-wrapped",
		"wikitext": "<indicator name=\"x\"><!-- hello -->\n<span>some stuff</span>\n<!-- second comment--></indicator>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"x\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "<!-- hello -->",
				"name": "mw-exttag"
			},
			{
				"text": "<span>some stuff</span>",
				"name": "mw-exttag"
			},
			{
				"text": "<!-- second comment-->",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			}
		]
	},
	{
		"desc": "Indicator shouldn't prevent empty elt class",
		"wikitext": "<nowiki/><indicator name=\"x\">\n<span>some stuff</span>\n</indicator><nowiki/>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"x\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "<span>some stuff</span>",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Indicator shouldn't prevent addition of link classes",
		"wikitext": "<indicator name=\"link\">[http://www.example.com Example]</indicator>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator ",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-indicator"
			},
			{
				"text": "\"link\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "[http://www.example.com Example]",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-indicator"
			},
			{
				"text": "indicator",
				"name": "mw-exttag-name mw-ext-indicator"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-indicator"
			}
		]
	},
	{
		"desc": "InputBox type=search",
		"wikitext": "<inputbox>\ntype=search\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=search",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=create",
		"wikitext": "<inputbox>\ntype=create\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=create",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=create with minor",
		"wikitext": "<inputbox>\ntype=create\nminor=1\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=create",
				"name": "mw-exttag"
			},
			{
				"text": "minor=1",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=create with minor=0",
		"wikitext": "<inputbox>\ntype=create\nminor=0\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=create",
				"name": "mw-exttag"
			},
			{
				"text": "minor=0",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=create with preloadparams",
		"wikitext": "<inputbox>\ntype=create\npreloadparams[]=param1\npreloadparams[]=param2\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=create",
				"name": "mw-exttag"
			},
			{
				"text": "preloadparams[]=param1",
				"name": "mw-exttag"
			},
			{
				"text": "preloadparams[]=param2",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=create with empty preloadparams",
		"wikitext": "<inputbox>\ntype=create\npreloadparams[]=\npreloadparams[]=\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=create",
				"name": "mw-exttag"
			},
			{
				"text": "preloadparams[]=",
				"name": "mw-exttag"
			},
			{
				"text": "preloadparams[]=",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=create with editintro",
		"wikitext": "<inputbox>\ntype=create\neditintro=MediaWiki:Test\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=create",
				"name": "mw-exttag"
			},
			{
				"text": "editintro=MediaWiki:Test",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=create with empty editintro",
		"wikitext": "<inputbox>\ntype=create\neditintro=\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=create",
				"name": "mw-exttag"
			},
			{
				"text": "editintro=",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=create with summary",
		"wikitext": "<inputbox>\ntype=create\nsummary=Summary test\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=create",
				"name": "mw-exttag"
			},
			{
				"text": "summary=Summary test",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=create with empty summary",
		"wikitext": "<inputbox>\ntype=create\nsummary=\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=create",
				"name": "mw-exttag"
			},
			{
				"text": "summary=",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=create with nosummary",
		"wikitext": "<inputbox>\ntype=create\nnosummary=true\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=create",
				"name": "mw-exttag"
			},
			{
				"text": "nosummary=true",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=create with empty nosummary",
		"wikitext": "<inputbox>\ntype=create\nnosummary=\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=create",
				"name": "mw-exttag"
			},
			{
				"text": "nosummary=",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=create with prefix",
		"wikitext": "<inputbox>\ntype=create\nprefix=Test/\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=create",
				"name": "mw-exttag"
			},
			{
				"text": "prefix=Test/",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=create with empty prefix",
		"wikitext": "<inputbox>\ntype=create\nprefix=\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=create",
				"name": "mw-exttag"
			},
			{
				"text": "prefix=",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=create with preload",
		"wikitext": "<inputbox>\ntype=create\npreload=test\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=create",
				"name": "mw-exttag"
			},
			{
				"text": "preload=test",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=create with empty preload",
		"wikitext": "<inputbox>\ntype=create\npreload=\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=create",
				"name": "mw-exttag"
			},
			{
				"text": "preload=",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=comment",
		"wikitext": "<inputbox>\ntype=comment\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=comment",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=comment with preloadtitle",
		"wikitext": "<inputbox>\ntype=comment\npreloadtitle=My title\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=comment",
				"name": "mw-exttag"
			},
			{
				"text": "preloadtitle=My title",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=commenttitle",
		"wikitext": "<inputbox>\ntype=commenttitle\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=commenttitle",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=commenttitle with preloadtitle",
		"wikitext": "<inputbox>\ntype=commenttitle\npreloadtitle=This should be ignored\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=commenttitle",
				"name": "mw-exttag"
			},
			{
				"text": "preloadtitle=This should be ignored",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=fulltext",
		"wikitext": "<inputbox>\ntype=fulltext\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=fulltext",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=move",
		"wikitext": "<inputbox>\ntype=move\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=move",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=search with tour",
		"wikitext": "<inputbox>\ntype=search\ntour=test\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=search",
				"name": "mw-exttag"
			},
			{
				"text": "tour=test",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox type=search with aria label",
		"wikitext": "<inputbox>\ntype=search\narialabel=Search this wiki\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=search",
				"name": "mw-exttag"
			},
			{
				"text": "arialabel=Search this wiki",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox with different search-special-page preference value",
		"wikitext": "<inputbox>\ntype=search\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=search",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "InputBox searchengine",
		"wikitext": "<inputbox>\ntype=search\nsearchengine=MediaSearch\n</inputbox>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "type=search",
				"name": "mw-exttag"
			},
			{
				"text": "searchengine=MediaSearch",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			},
			{
				"text": "inputbox",
				"name": "mw-exttag-name mw-ext-inputbox"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-inputbox"
			}
		]
	},
	{
		"desc": "Interlanguage link",
		"wikitext": "Blah blah blah\n[[zh:Chinese]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "zh:Chinese",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Interlanguage link with spacing",
		"wikitext": "Blah blah blah\n[[   zh  :    Chinese     ]]",
		"nodes": [
			{
				"text": "[[   ",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "zh  :    Chinese     ",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Double interlanguage link",
		"wikitext": "Blah blah blah\n[[es:Spanish]]\n[[zh:Chinese]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Spanish",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "zh:Chinese",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Interlanguage link variations",
		"wikitext": "Blah blah blah\n[[   es :Spanish]]\n[[ ZH :Chinese]]\n[[es:Foo_bar]]",
		"nodes": [
			{
				"text": "[[   ",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es :Spanish",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[ ",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "ZH :Chinese",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo_bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Escaping of interlanguage links (T129218, T156308)",
		"wikitext": "Blah blah blah\n[[:es:Spanish]]\n[[ : zh : Chinese ]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":es:Spanish",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[ ",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ": zh : Chinese ",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Multiple colons escaping interlanguage links",
		"wikitext": "[[:es:Spanish]]\n[[::es:Spanish]]\n[[:::es:Spanish]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":es:Spanish",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "::es:Spanish",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":::es:Spanish",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Space and question mark encoding in interlanguage links (T95473)",
		"wikitext": "Blah blah blah\n[[es:Foo bar?]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:Foo bar?",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "\"Extra\" interlanguage links (T34189 / gerrit 111390)",
		"wikitext": "Blah blah blah\n[[mul:Article]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "mul:Article",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Language links render as inline links if $wgInterwikiMagic=false",
		"wikitext": "Blah blah blah\n[[zh:Chinese]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "zh:Chinese",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Language links render as inline links in the Talk namespace",
		"wikitext": "Blah blah blah\n[[zh:Chinese]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "zh:Chinese",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid: recognize interlanguage links without a target page",
		"wikitext": "[[es:]]\n\n[[ko:]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "es:",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "ko:",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid: recognize interwiki links without a target page",
		"wikitext": "[[:es:]]\n\n[[:ko:]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":es:",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":ko:",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Handle interwiki links pointing to the current wiki as plain wiki links (T47209)",
		"wikitext": "[[mi:Foo]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "mi:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Interlanguage link with preceding local interwiki link (T70085)",
		"wikitext": "Blah blah blah\n[[local:es:Spanish]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "local:es:Spanish",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Looks like an interlanguage link, but is actually a local interwiki",
		"wikitext": "Blah blah blah\n[[mi:Template:Foo]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "mi:Template:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Interlanguage link with a fragment",
		"wikitext": "[[zh:Chinese#fragment]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "zh:Chinese",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "fragment",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "{{#interlanguagelink}} parser function as a means to force an interlanguage link (T363538)",
		"wikitext": "*{{#interlanguagelink:mi|Template:Bar}}\n*[[mi:Template:Foo]]",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#interlanguagelink",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "mi",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Template:Bar",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "mi:Template:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "{{#interlanguagelink}} parser function as a means to force an interlanguage link, v2 (T363538)",
		"wikitext": "*{{#interlanguagelink:mi|Template:Bat#fragment-kept|caption is ignored}}",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#interlanguagelink",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "mi",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Template:Bat#fragment-kept",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "caption is ignored",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "{{#interlanguagelink}} parser function as a means to force an interlanguage link, v3 (T381977)",
		"wikitext": "*{{#interlanguagelink:mi|_}}\n*{{#interlanguagelink:mi|_Template:Bar}}\n*{{#interlanguagelink:mi|Template:Bar_}}\n*{{#interlanguagelink:mi|Template:Bar\nnewline}}",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#interlanguagelink",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "mi",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "_",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#interlanguagelink",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "mi",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "_Template:Bar",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#interlanguagelink",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "mi",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Template:Bar_",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#interlanguagelink",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "mi",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Template:Bar",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "newline",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Inline interwiki link",
		"wikitext": "[[MeatBall:SoftSecurity]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "MeatBall:SoftSecurity",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Inline interwiki link with empty title (T4372)",
		"wikitext": "[[MeatBall:]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "MeatBall:",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Interwiki link encoding conversion (T3636)",
		"wikitext": "*[[Wikipedia:ro:Olteni&#0355;a]]\n*[[Wikipedia:ro:Olteni&#355;a]]",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Wikipedia:ro:Olteni",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "&#0355;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "a",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Wikipedia:ro:Olteni",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "&#355;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "a",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Interwiki link with fragment (T4130)",
		"wikitext": "[[MeatBall:SoftSecurity#foo]]\n\n[[meatball:Soft#Bar]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "MeatBall:SoftSecurity",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "foo",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:Soft",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Bar",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link scenarios with escaped fragments",
		"wikitext": "[[#Is this great?]]\n[[Foo#Is this great?]]\n[[meatball:Foo#Is this great?]]\n[[:en:Foo#Is this great?]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Is this great?",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Is this great?",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Is this great?",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":en:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Is this great?",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link scenarios with escaped fragments (legacy)",
		"wikitext": "[[#Is this great?]]\n[[Foo#Is this great?]]\n[[meatball:Foo#Is this great?]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Is this great?",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Is this great?",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "Is this great?",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Different interwiki prefixes mapping to the same URL",
		"wikitext": "[[:en:Foo]]\n\n[[:en:Foo|Foo]]\n\n[[wikipedia:Foo]]\n\n[[:wikipedia:Foo|Foo]]\n\n[[wikipedia:en:Foo]]\n\n[[:wikipedia:en:Foo]]\n\n[[  wikiPEdia :Foo]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":en:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":en:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "wikipedia:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":wikipedia:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "wikipedia:en:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":wikipedia:en:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[  ",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "wikiPEdia :Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Interwiki links that cannot be represented in wiki syntax",
		"wikitext": "[[meatball:ok]]\n[[meatball:ok#foo|ok with fragment]]\n[[meatball:ok_as_well?|ok ending with ? mark]]\n[http://de.wikipedia.org/wiki/Foo?action=history has query]\n[http://de.wikipedia.org/wiki/#foo is just fragment]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:ok",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:ok",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "foo",
				"name": "mw-link-ground className"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "ok with fragment",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:ok_as_well?",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "ok ending with ? mark",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "de.wikipedia.org/wiki/Foo?action=history",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "has query",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "de.wikipedia.org/wiki/#foo",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "is just fragment",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Interwiki links: trail",
		"wikitext": "[[wikipedia:Foo|Ba]]r",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "wikipedia:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Ba",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Local interwiki link",
		"wikitext": "[[local:Template:Foo]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "local:Template:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Local interwiki link: self-link to current page",
		"wikitext": "[[local:Main Page]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "local:Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Local interwiki link: prefix only (T66167)",
		"wikitext": "[[local:]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "local:",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Local interwiki link: with additional interwiki prefix (T63357)",
		"wikitext": "[[local:meatball:Hello]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "local:meatball:Hello",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Multiple local interwiki link prefixes",
		"wikitext": "[[local:local:local:local:mi:local:Foo]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "local:local:local:local:mi:local:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Interwiki link that could be a language link, if not for a local interwiki prefix (T292022)",
		"wikitext": "[[:es:Hello|local:es:Hello]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":es:Hello",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "local:es:Hello",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Internal link with a namespace matching a local interwiki prefix (T228616)",
		"wikitext": "[[Project:Hello]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Project:Hello",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "{{#interwikilink}} parser function as a means to force an interwiki link (T363538)",
		"wikitext": "[[Project:Hello World]]\n\n{{#interwikilink:Project|Hello World}}\n\n{{#interwikilink:Project|Hello World 2|caption text}}",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Project:Hello World",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#interwikilink",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Project",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Hello World",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#interwikilink",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Project",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Hello World 2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "caption text",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "{{#interwikilink}} parser function as a means to force an interwiki link v2 (T381977)",
		"wikitext": "{{#interwikilink:Project|_Hello World}}\n\n{{#interwikilink:Project|Hello World_}}\n\n{{#interwikilink:Project|Hello World\nnewline}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#interwikilink",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Project",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "_Hello World",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#interwikilink",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Project",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Hello World_",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#interwikilink",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Project",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Hello World",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "newline",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Interwiki link with percent encoded target",
		"wikitext": "[[:es:Nueva Guip%C3%BAzcoa|Nueva Guipúzcoa]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":es:Nueva Guip%C3%BAzcoa",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Nueva Guipúzcoa",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Interwiki link with colon escape after prefix",
		"wikitext": "[[meatball::Category:Hello]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball::Category:Hello",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Self-links and interwiki",
		"wikitext": "[[local:Main Page]]\n\n[[meatball:Main Page]]\n\n[[mi:Main Page]]\n\n[[local:Main Page#anchor]]\n\n[[meatball:Main Page#anchor]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "local:Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "mi:Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "local:Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "anchor",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "anchor",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Language converter: output gets cut off unexpectedly (T7757)",
		"wikitext": "this bit is safe: }-\n\nbut if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-\n\nthen we get cut off here: }-\n\nall additional text is vanished",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Don't convert blue categorylinks to another variant (T35210)",
		"wikitext": "[[A]][[Category:分类]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "A",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]][[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:分类",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Explicit definition of language variant alternatives",
		"wikitext": "-{zh:China;zh-tw:Taiwan}-, is China",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Explicit definition of language variant alternatives (BCP 47 codes)",
		"wikitext": "-{zh:China;zh-Hant-TW:Taiwan}-, is China",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "html2wt support for edited wildcard rule (strip trailing semi where needed)",
		"wikitext": "test: -{H|zh:content; }-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "; ",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "html2wt support for wildcard rule with whitespace around flag value",
		"wikitext": "test: -{ H  |all variants}-",
		"nodes": [
			{
				"text": "-{ ",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H  ",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Filter syntax for language variants",
		"wikitext": "foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "zh;zh-hans;zh-hant",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Explicit session-wise two-way language variant mapping (A flag and - flag)",
		"wikitext": "This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.\n\nTaiwan is China.\n\n-{A|zh:China; zh-tw:Taiwan}- is China,\n\n(This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)\n\nand -{China}- is China.",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "A",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Explicit session-wise one-way language variant mapping (A flag and - flag)",
		"wikitext": "This is -{LOCATION=>zh:China;LOCATION=>zh-tw:Taiwan}-, but we'll forget that now.\n\nLOCATION is China or Taiwan.\n\n-{A|LOCATION=>zh:China;LOCATION=>zh-tw:Taiwan}- is LOCATION,\n\n(This-{-|LOCATION=>zh:China;LOCATION=>zh-tw:Taiwan}- should be stripped!)\n\nand -{LOCATION}- is LOCATION.",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "A",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Explicit session-wise two-way language variant mapping (H flag for hide)",
		"wikitext": "(This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)\n\nTaiwan is China.",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Explicit session-wise one-way language variant mapping (H flag for hide)",
		"wikitext": "(This-{H|LOCATION=>zh:China;LOCATION=>zh-tw:Taiwan}- should be stripped!)\n\nLOCATION is Taiwan and China.",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Adding explicit conversion rule for title (T flag)",
		"wikitext": "Should be stripped-{T|zh:China;zh-tw:Taiwan}-!\n\nTaiwan is China.",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Code coverage: T combined with H flag",
		"wikitext": "Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!\n\nTaiwan is China.",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T;H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Code coverage: T with no variants",
		"wikitext": "-{H|zh:China; zh-tw:Taiwan}-\nTaiwan is China.-{T|Taiwan is China}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Code coverage: rules with no variants",
		"wikitext": "-{H|zh:China; zh-tw:Taiwan}-\nTaiwan is China.\n-{H|China}-\nTaiwan is China.",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Code coverage: D flag for conversion rule",
		"wikitext": "-{D|zh-cn:XA; zh-tw:YA}-\n-{A;D|zh-cn:XB; zh-tw:YB}-\n-{D;H|zh-cn:XC; zh-tw:YC}-\n\n-{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-\n\n-{D|0=>zh-tw:1}-\n-{A;D|2=>zh-tw:3}-\n-{D;H|4=>zh-tw:5}-\n\nXA XB XC YA YB YC FOO BAR BAT 012345",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "D",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "A;D",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "D;H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "D;H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "D",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "A;D",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "D;H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Code coverage: N flag for conversion rule",
		"wikitext": "-{N|zh-cn}-\n\n-{N|zh-tw}-\n\n-{N|sr-ec}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "N",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "N",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "N",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Code coverage: N flag for conversion rule (wt2html only)",
		"wikitext": "-{D;N|en}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "D;N",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Testing that changing the language variant here in the tests actually works",
		"wikitext": "Should be stripped-{T|zh:China; zh-tw:Taiwan}-!",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Title with HTML",
		"wikitext": "-{T|zh:Title <i style=\"color:red\">with</i> HTML&amp;Entities}-\nShould be stripped!",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "i ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"color:red\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Title with Wiki syntax",
		"wikitext": "-{T|zh:Title ''with'' Wiki's s&uuml;ntax&copy}-\nShould be stripped!",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "with",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "&uuml;",
				"name": "mw-html-entity"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Title with JavaScript injection",
		"wikitext": "-{T|zh:Title <i onclick=\"alert(42)\">click me</i> <script>alert(43)</script>}-\nShould be stripped!",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "i ",
				"name": "tagName"
			},
			{
				"text": "onclick=",
				"name": "attributeName"
			},
			{
				"text": "\"alert(42)\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Test 1 from T298401/T67747",
		"wikitext": "-{T|zh:Title <script>a</script>&amp;<i>b</i>}-\nShould be stripped!",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "&amp;",
				"name": "mw-html-entity"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "i",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Test 2 from T298401/T67747",
		"wikitext": "-{T|zh:Title <code style=\"display:none\">}-\nShould be stripped!",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "code ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"display:none\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Test 3 from T298401/T67747",
		"wikitext": "-{T|zh:Title <b>Foo bar<b>}-\nShould be stripped!",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Recursive conversion of alt and title attrs shouldn't clear converter state",
		"wikitext": "-{H|zh-cn:Exclamation; zh-tw:exclamation}-\nShould be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title=\"exclamation\">!</span>",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"exclamation\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T26072: more test on conversion rule for title",
		"wikitext": "This should be stripped-{T|zh:China; zh-tw:Taiwan}-!\n\nThis won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Partly disable title conversion if variant == main language code",
		"wikitext": "-{T|zh-cn:CN;zh-tw:TW}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Partly disable title conversion if variant == main language code, more",
		"wikitext": "-{T|TW}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Raw output of variant escape tags (R flag)",
		"wikitext": "Raw: -{R|zh:China;zh-tw:Taiwan}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "R",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Raw output of variant escape tags (R flag) (wt2html only)",
		"wikitext": "-{Variant}- -{D|syntax}- -{D;R|options}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "D",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "D;R",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Nested markup inside raw output of variant escape tags (R flag)",
		"wikitext": "Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "R",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Nested markup and spaces inside raw output of variant escape tags (R flag)",
		"wikitext": "X-{ outer -{ inner }- outer }-X",
		"nodes": [
			{
				"text": "-{ ",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{ ",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Templates inside raw output of variant escape tags (R flag)",
		"wikitext": "Nested raw: -{R|nested {{1x|hi}} templates}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "R",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "hi",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Strings evaluating false shouldn't be ignored by Language converter (T51072)",
		"wikitext": "-{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Conversion rules from [numeric-only string] to [something else] (T48634)",
		"wikitext": "-{H|0=>zh-cn:B}--{H|0=>zh-cn:C;0=>zh-cn:D}--{H|0=>zh-hans:A}-012345-{A|zh-tw:0;zh-cn:E;}-012345",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}--{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}--{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "A",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Two-way converter rule entries with an empty value should be ignored (T53551)",
		"wikitext": "-{H|zh-cn:foo;zh-tw:;}-foobar",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "One-way converter rule entries with an empty \"from\" string should be ignored (T53551)",
		"wikitext": "-{H|=>zh-cn:foo;}-foobar",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Empty converter rule entries shouldn't be inserted into the conversion table (T53551)",
		"wikitext": "-{H|}-foobar",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Nested using of manual convert syntax",
		"wikitext": "Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "HTML markups with conversion syntax in attribs, nested in other conversion blocks",
		"wikitext": "-{zh;zh-hans;zh-hant|<span title=\"-{X}-\">A</span>}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "zh;zh-hans;zh-hant",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"-{X}-\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)",
		"wikitext": "-{<span title=\"-{X}-\">A</span>}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"-{X}-\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Language converter markup with block content",
		"wikitext": "<span>a-{b<div>c}-d\n\n<span>a-{zh;zh-hans;zh-hant|b<div>c}-d\n\n<span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "zh;zh-hans;zh-hant",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "LanguageConverter selser (1)",
		"wikitext": "-{raw}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "LanguageConverter selser (2)",
		"wikitext": "<span class=\"x\">TEXT1</span>\n[http://example.com TEXT2]\n[[Foo|TEXT3]]\n{{1x|TEXT4}}",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "class=",
				"name": "attributeName"
			},
			{
				"text": "\"x\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "TEXT2",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "TEXT3",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "TEXT4",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "LanguageConverter selser (3)",
		"wikitext": "{|\n|-\n|<span>Foo</span>\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "LanguageConverter selser (4)",
		"wikitext": "{|\n|-\n|<span class=\"x\">Foo</span>-{Bar}-\n||<span class=\"x\">Foo</span>-{Bar}-\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "class=",
				"name": "attributeName"
			},
			{
				"text": "\"x\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span ",
				"name": "tagName"
			},
			{
				"text": "class=",
				"name": "attributeName"
			},
			{
				"text": "\"x\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "T153135: Don't break list handling if language converter markup is in the item.",
		"wikitext": ";-{zh-cn:AAA;zh-tw:BBB}-\n;-{R|foo:bar}-",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "zh-cn:AAA;zh-tw:BBB",
				"name": "mw-strong"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "R",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "foo:bar",
				"name": "mw-strong"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "T153135: Unclosed markup in definition list (code coverage)",
		"wikitext": ";<b>foo:bar\n;-{zh-cn:AAA",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "zh-cn:AAA",
				"name": "mw-strong"
			}
		]
	},
	{
		"desc": "T153135: Nested language converter markup in definition list (code coverage)",
		"wikitext": ";-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "zh-cn:AAA ",
				"name": "mw-strong"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "zh-hans",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "foo:bar",
				"name": "mw-strong"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": " ",
				"name": "mw-strong"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "R",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "bat:baz",
				"name": "mw-strong"
			},
			{
				"text": "}-}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			}
		]
	},
	{
		"desc": "Language converter tricky html2wt cases (5)",
		"wikitext": "-{H|<nowiki>a:b=>c</nowiki>=>zh-cn:<nowiki>x;foo=>zh-cn:boo</nowiki>;bar=>zh-cn:<nowiki>bat;xyz=>zh-cn:abc</nowiki>}-foobar\n\n-{H|A=><nowiki>bo:g;us</nowiki>:B}-\n\n-{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-\n\n-{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-\n\na:b=>c xyz",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "a:b=>c",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "x;foo=>zh-cn:boo",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "bat;xyz=>zh-cn:abc",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "bo:g;us",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "A",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "0;zh-tw:bar",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "bo:g;us",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "T239806: Trailing garbage in language converter rules (1)",
		"wikitext": "-{H|zh-cn:约翰·塞纳; zh-hk:莊·先拿; zh-tw:約翰·希南; ;}-\n-{H|zh-cn:泰瑞斯·吉布森; zh-hk:泰列斯·吉遜; zh-tw:泰瑞斯·吉布森; ;}-\n-{H|zh-cn:金·米尔福特; zh-tw:金·米爾福特; 真·米爾福特;}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": " ;",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": " ;",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "T239806: Trailing garbage in language converter rules (2)",
		"wikitext": "-{H|zh-cn:玛格特·罗比; zh-tw:瑪格·羅比; zh-hk:瑪歌·羅比; zh-sg:玛格·罗比; ;}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": " ;",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Langconvert tag: crh-latn to crh-cyrl",
		"wikitext": "<langconvert from=\"crh-latn\" to=\"crh-cyrl\">test</langconvert>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert ",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": "from=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"crh-latn\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " to=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"crh-cyrl\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "test",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			}
		]
	},
	{
		"desc": "Langconvert tag: en to en-x-piglatin",
		"wikitext": "<langconvert from=\"en\" to=\"en-x-piglatin\">test</langconvert>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert ",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": "from=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"en\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " to=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"en-x-piglatin\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "test",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			}
		]
	},
	{
		"desc": "Langconvert tag: gan-hans to gan-hant",
		"wikitext": "<langconvert from=\"gan-hans\" to=\"gan-hant\">爱</langconvert>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert ",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": "from=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"gan-hans\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " to=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"gan-hant\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "爱",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			}
		]
	},
	{
		"desc": "Langconvert tag: ku-latn to ku-arab",
		"wikitext": "<langconvert from=\"ku-latn\" to=\"ku-arab\">test</langconvert>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert ",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": "from=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"ku-latn\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " to=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"ku-arab\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "test",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			}
		]
	},
	{
		"desc": "Langconvert tag: shi-latn to shi-tfng",
		"wikitext": "<langconvert from=\"shi-latn\" to=\"shi-tfng\">test</langconvert>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert ",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": "from=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"shi-latn\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " to=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"shi-tfng\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "test",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			}
		]
	},
	{
		"desc": "Langconvert tag: sr-latn to sr-cyrl",
		"wikitext": "<langconvert from=\"sr-latn\" to=\"sr-cyrl\">zdravo</langconvert>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert ",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": "from=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"sr-latn\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " to=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"sr-cyrl\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "zdravo",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			}
		]
	},
	{
		"desc": "Langconvert tag: sr-el to sr-ec (should fail)",
		"wikitext": "<langconvert from=\"sr-el\" to=\"sr-ec\">zdravo</langconvert>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert ",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": "from=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"sr-el\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " to=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"sr-ec\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "zdravo",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			}
		]
	},
	{
		"desc": "Langconvert tag: tg to tg-latn",
		"wikitext": "<langconvert from=\"tg\" to=\"tg-latn\">тест</langconvert>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert ",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": "from=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"tg\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " to=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"tg-latn\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "тест",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			}
		]
	},
	{
		"desc": "Langconvert tag: uz-cyrl to uz-latn",
		"wikitext": "<langconvert from=\"uz-cyrl\" to=\"uz-latn\">тест</langconvert>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert ",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": "from=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"uz-cyrl\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " to=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"uz-latn\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "тест",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			}
		]
	},
	{
		"desc": "Langconvert tag: zh-hans to zh-hant",
		"wikitext": "<langconvert from=\"zh-hans\" to=\"zh-hant\">爱</langconvert>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert ",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": "from=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"zh-hans\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " to=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"zh-hant\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "爱",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			}
		]
	},
	{
		"desc": "Langconvert tag: self-closed",
		"wikitext": "x<langconvert from=\"crh-latn\" to=\"crh-cyrl\"/>x",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			},
			{
				"text": "langconvert ",
				"name": "mw-exttag-name mw-ext-langconvert"
			},
			{
				"text": "from=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"crh-latn\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " to=",
				"name": "mw-exttag-attribute mw-ext-langconvert"
			},
			{
				"text": "\"crh-cyrl\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-langconvert"
			}
		]
	},
	{
		"desc": "T302678: Serialize empty twoway",
		"wikitext": "-{H|}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Verify that the built-in transliteration rules contain our test\ncharacters (traditional to simplified)",
		"wikitext": "* air (qì): 氣\n* horse (mǎ): 馬\n* electricity (diàn): 電",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Verify that the built-in transliteration rules contain our test\ncharacters (simplified to traditional)",
		"wikitext": "* air (qì): 气\n* horse (mǎ): 马\n* electricity (diàn): 电",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			}
		]
	},
	{
		"desc": "Bidirectional conversion (hans)",
		"wikitext": "-{zh-cn:气气气;zh-tw:電電電}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Bidirectional conversion (hant)",
		"wikitext": "-{zh-cn:气气气;zh-tw:電電電}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Unidirectional conversion (zh)",
		"wikitext": "-{H|電電電=>zh-cn:气气气}-\n馬马: 電電電, 气气气",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Unidirectional conversion (zh-hans)",
		"wikitext": "-{H|電電電=>zh-cn:气气气}-\n馬马: 電電電, 气气气",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Unidirectional conversion (zh-cn)",
		"wikitext": "-{H|電電電=>zh-cn:气气气}-\n馬马: 電電電, 气气气",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Unidirectional conversion (zh-hant)",
		"wikitext": "-{H|電電電=>zh-cn:气气气}-\n馬马: 電電電, 气气气",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Unidirectional conversion 2 (zh)",
		"wikitext": "-{H|電電電=>zh-hans:气气气}-\n馬马: 電電電, 气气气",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Unidirectional conversion 2 (zh-cn)",
		"wikitext": "-{H|電電電=>zh-hans:气气气}-\n馬马: 電電電, 气气气",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Unidirectional conversion 2 (zh-hans)",
		"wikitext": "-{H|電電電=>zh-hans:气气气}-\n馬马: 電電電, 气气气",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Unidirectional conversion 2 (zh-hant)",
		"wikitext": "-{H|電電電=>zh-hans:气气气}-\n馬马: 電電電, 气气气",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Disable language conversion",
		"wikitext": "-{氣气}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Disable language conversion (alternate form)",
		"wikitext": "-{R|氣气}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "R",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Semi-disabled conversion (zh)",
		"wikitext": "-{H|zh-hant:電電電;zh-hans:气气气}-\n電電電 气气气\n\n電-{}-電電 气-{}-气气",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Semi-disabled conversion (zh-hans)",
		"wikitext": "-{H|zh-hant:電電電;zh-hans:气气气}-\n電電電 气气气\n\n電-{}-電電 气-{}-气气",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Semi-disabled conversion (zh-hant)",
		"wikitext": "-{H|zh-hant:電電電;zh-hans:气气气}-\n電電電 气气气\n\n電-{}-電電 气-{}-气气",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Insert a conversion rule without output (zh)",
		"wikitext": "-{H|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-\n馬马: 气气气, 馬馬馬, 電電電",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Insert a conversion rule without output (zh-hans)",
		"wikitext": "-{H|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-\n馬马: 气气气, 馬馬馬, 電電電",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Insert a conversion rule without output (zh-cn)",
		"wikitext": "-{H|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-\n馬马: 气气气, 馬馬馬, 電電電",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Insert a conversion rule without output (zh-hant)",
		"wikitext": "-{H|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-\n馬马: 气气气, 馬馬馬, 電電電",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Insert a conversion rule without output (zh-hk)",
		"wikitext": "-{H|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-\n馬马: 气气气, 馬馬馬, 電電電",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Insert a conversion rule without output (zh-tw)",
		"wikitext": "-{H|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-\n馬马: 气气气, 馬馬馬, 電電電",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Insert a conversion rule with a result in the current language (zh)",
		"wikitext": "-{A|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-\n\n气气气, 馬馬馬, 電電電",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "A",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Insert a conversion rule with a result in the current language (zh-hans)",
		"wikitext": "-{A|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-\n\n气气气, 馬馬馬, 電電電",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "A",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Insert a conversion rule with a result in the current language (zh-cn)",
		"wikitext": "-{A|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-\n\n气气气, 馬馬馬, 電電電",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "A",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Insert a conversion rule with a result in the current language (zh-hant)",
		"wikitext": "-{A|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-\n\n气气气, 馬馬馬, 電電電",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "A",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Insert a conversion rule with a result in the current language (zh-hk)",
		"wikitext": "-{A|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-\n\n气气气, 馬馬馬, 電電電",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "A",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Insert a conversion rule with a result in the current language (zh-tw)",
		"wikitext": "-{A|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-\n\n气气气, 馬馬馬, 電電電",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "A",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Remove existing conversion rule (zh)",
		"wikitext": "-{H|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}- <!-- Add a rule -->\n+ 气气气, 馬馬馬, 電電電\n\n-{-|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}- <!-- Remove a rule -->\n- 气气气, 馬馬馬, 電電電",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<!-- Add a rule -->",
				"name": "comment"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<!-- Remove a rule -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Remove existing conversion rule (zh-hans)",
		"wikitext": "-{H|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}- <!-- Add a rule -->\n+ 气气气, 馬馬馬, 電電電\n\n-{-|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}- <!-- Remove a rule -->\n- 气气气, 馬馬馬, 電電電",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<!-- Add a rule -->",
				"name": "comment"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<!-- Remove a rule -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Remove existing conversion rule (zh-cn)",
		"wikitext": "-{H|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}- <!-- Add a rule -->\n+ 气气气, 馬馬馬, 電電電\n\n-{-|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}- <!-- Remove a rule -->\n- 气气气, 馬馬馬, 電電電",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<!-- Add a rule -->",
				"name": "comment"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<!-- Remove a rule -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Remove existing conversion rule (zh-hant)",
		"wikitext": "-{H|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}- <!-- Add a rule -->\n+ 气气气, 馬馬馬, 電電電\n\n-{-|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}- <!-- Remove a rule -->\n- 气气气, 馬馬馬, 電電電",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<!-- Add a rule -->",
				"name": "comment"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<!-- Remove a rule -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Remove existing conversion rule (zh-hk)",
		"wikitext": "-{H|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}- <!-- Add a rule -->\n+ 气气气, 馬馬馬, 電電電\n\n-{-|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}- <!-- Remove a rule -->\n- 气气气, 馬馬馬, 電電電",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<!-- Add a rule -->",
				"name": "comment"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<!-- Remove a rule -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Remove existing conversion rule (zh-tw)",
		"wikitext": "-{H|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}- <!-- Add a rule -->\n+ 气气气, 馬馬馬, 電電電\n\n-{-|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}- <!-- Remove a rule -->\n- 气气气, 馬馬馬, 電電電",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<!-- Add a rule -->",
				"name": "comment"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "<!-- Remove a rule -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Override page title (zh)",
		"wikitext": "-{T|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Override page title (zh-hans)",
		"wikitext": "-{T|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Override page title (zh-hk)",
		"wikitext": "-{T|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Override page title (zh-tw)",
		"wikitext": "-{T|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "T",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Describe bidirectional conversion rule",
		"wikitext": "-{D|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "D",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Describe unidirectional conversion rule",
		"wikitext": "-{D;H|電電電=>zh-cn:气气气}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "D;H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Localized language names",
		"wikitext": "-{N|zh-cn}-\n\n-{N|zh-tw}-\n\n-{N|sr-ec}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "N",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "N",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "N",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Only consider certain variants for conversion (zh)",
		"wikitext": "-{H|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-\n馬马 1: -{zh;zh-hans;zh-hant|气气气, 馬馬馬, 電電電}-\n\n馬马 2: -{zh;zh-cn;zh-hk|气气气, 馬馬馬, 電電電}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "zh;zh-hans;zh-hant",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "zh;zh-cn;zh-hk",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Only consider certain variants for conversion (zh-hans)",
		"wikitext": "-{H|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-\n馬马 1: -{zh;zh-hans;zh-hant|气气气, 馬馬馬, 電電電}-\n\n馬马 2: -{zh;zh-cn;zh-hk|气气气, 馬馬馬, 電電電}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "zh;zh-hans;zh-hant",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "zh;zh-cn;zh-hk",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Only consider certain variants for conversion (zh-hant)",
		"wikitext": "-{H|zh-cn:气气气;zh-hk:馬馬馬;zh-tw:電電電;}-\n馬马 1: -{zh;zh-hans;zh-hant|气气气, 馬馬馬, 電電電}-\n\n馬马 2: -{zh;zh-cn;zh-hk|气气气, 馬馬馬, 電電電}-",
		"nodes": [
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "H",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": ";",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "zh;zh-hans;zh-hant",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "-{",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "zh;zh-cn;zh-hk",
				"name": "mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-conversion-delimiter"
			},
			{
				"text": "}-",
				"name": "mw-conversion-bracket"
			}
		]
	},
	{
		"desc": "Conversion skips <pre> and <code>",
		"wikitext": "<pre>氣气</pre>\n<code>氣气</code>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "氣气",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "code",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "code",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "\"Force convert\" of <pre>",
		"wikitext": "<pre>氣-{}-气</pre>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "氣-{}-气",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "\"Force convert\" of <code>",
		"wikitext": "<code>氣-{}-气</code>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "code",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "-{}-",
				"name": "mw-conversion-bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "code",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Scribunto: no such module",
		"wikitext": "{{#invoke:foo|bar}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "foo",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "bar",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: no such function",
		"wikitext": "{{#invoke:test|blah}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "blah",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: hello world",
		"wikitext": "{{#invoke:test|hello}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "hello",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: redirect to hello world",
		"wikitext": "{{#invoke:redirected|hello}}\n{{#invoke:redirected \"with\" quotes|hello}}\n{{#invoke:redirected|testIsRedirect|Module:Redirected}}\n{{#invoke:redirected \"with\" quotes|testIsRedirect|Module:Test \"with\" quotes}}\n{{#invoke:redirected \"with\" quotes|testIsRedirect|Module:Redirected \"with\" quotes}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "redirected",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "hello",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "redirected \"with\" quotes",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "hello",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "redirected",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "testIsRedirect",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Module:Redirected",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "redirected \"with\" quotes",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "testIsRedirect",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Module:Test \"with\" quotes",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "redirected \"with\" quotes",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "testIsRedirect",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Module:Redirected \"with\" quotes",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: getAllArgs",
		"wikitext": "{{#invoke:test|getAllArgs|x|y|z|a=1|b=2|c=3|7=?}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "getAllArgs",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "x",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "y",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "z",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "a=1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "b=2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "c=3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "7=?",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: getAllArgs, deprecated style",
		"wikitext": "{{#invoke:test|getAllArgs2|x|y|z|a=1|b=2|c=3|7=?}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "getAllArgs2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "x",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "y",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "z",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "a=1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "b=2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "c=3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "7=?",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: getNumericArgs",
		"wikitext": "{{#invoke:test|getNumericArgs|x|y|z|a=1|b=2|c=3|7=?}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "getNumericArgs",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "x",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "y",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "z",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "a=1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "b=2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "c=3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "7=?",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: named numeric parameters",
		"wikitext": "{{#invoke:test|getArg|2|a|2=b}}\n{{#invoke:test|getArg|2|2=a|b}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "getArg",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "a",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2=b",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "getArg",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2=a",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "b",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: template-style argument trimming",
		"wikitext": "{{#invoke:test|getArgLength|2| x }}\n{{#invoke:test|getArgLength|2|2= x }}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "getArgLength",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " x ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "getArgLength",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2= x ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: missing argument",
		"wikitext": "{{#invoke:test|getArgType|2}}\n{{#invoke:test|getArgType|blah}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "getArgType",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "getArgType",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "blah",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: parent frame access",
		"wikitext": "{{Scribunto_all_args|x|y|z|a = 1|b = 2|c = 3}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Scribunto_all_args",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "x",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "y",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "z",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a =",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": " 1",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "b =",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": " 2",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "c =",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": " 3",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Scribunto: expandTemplate",
		"wikitext": "{{#invoke:test|testExpandTemplate}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "testExpandTemplate",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: expandTemplate with headers",
		"wikitext": "==foo==\n{{#invoke:test|testExpandTemplateWithHeaders}}",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "foo",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "testExpandTemplateWithHeaders",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: newTemplateParserValue",
		"wikitext": "{{#invoke:test|testNewTemplateParserValue}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "testNewTemplateParserValue",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: preprocess",
		"wikitext": "{{#invoke:test|testPreprocess|foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "testPreprocess",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "foo",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: newParserValue",
		"wikitext": "{{#invoke:test|testNewParserValue|foo}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "testNewParserValue",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "foo",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: table return",
		"wikitext": "{{#invoke:test|emptyTable}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "emptyTable",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: require",
		"wikitext": "{{#invoke:test|import}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "import",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: access to a module imported at the chunk level",
		"wikitext": "{{#invoke:test|bitop}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "bitop",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: invoke instance upvalue isolation",
		"wikitext": "{{#invoke:test|isolationTestUpvalue|1}}\n{{#invoke:test|isolationTestUpvalue|2}}\n{{#invoke:test|isolationTestUpvalue|3}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "isolationTestUpvalue",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "isolationTestUpvalue",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "isolationTestUpvalue",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: invoke instance global isolation",
		"wikitext": "{{#invoke:test|isolationTestGlobal|1}}\n{{#invoke:test|isolationTestGlobal|2}}\n{{#invoke:test|isolationTestGlobal|3}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "isolationTestGlobal",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "isolationTestGlobal",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "2",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "isolationTestGlobal",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "3",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: ASCII null",
		"wikitext": "{{#invoke:test|null}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "null",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: isSubsting during PST",
		"wikitext": "{{safesubst:#invoke:test|isSubsting}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "safesubst",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "isSubsting",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: isSubsting during normal parse",
		"wikitext": "{{safesubst:#invoke:test|isSubsting}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "safesubst",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "isSubsting",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: frame:getTitle",
		"wikitext": "{{#invoke:test|getFrameTitle}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "getFrameTitle",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: Metatable on export table",
		"wikitext": "{{#invoke:Metatables|zero}}\n{{#invoke:Metatables|one}}\n{{#invoke:Metatables|two}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Metatables",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "zero",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Metatables",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "one",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Metatables",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "two",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: Correct argument numbering with equals sign in function name",
		"wikitext": "{{#invoke:test|test=InFunctionName|good|bad}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test=InFunctionName",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "good",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "bad",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: Strip markers in CSS",
		"wikitext": "{{#invoke:test|testStrippedCss|<nowiki>#ff0000</nowiki>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "testStrippedCss",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "#ff0000",
				"name": "mw-ext-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Scribunto: Parser output isn't incorrectly cached across frames",
		"wikitext": "Root: {{#invoke:test|testFrameCaching}} Template: {{Scribunto frame caching}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "testFrameCaching",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Scribunto frame caching",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Scribunto: Test unstripNowiki behavior",
		"wikitext": "{{#invoke:EchoTest|echo|<nowiki>foo</nowiki>}}\n{{#invoke:EchoTest|echo|<nowiki>[[Foo]]</nowiki>}}\n\n{{#invoke:UnstripTest|unstrip|<nowiki>foo</nowiki>}}\n{{#invoke:UnstripTest|unstrip|<nowiki>[[Foo]]</nowiki>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "EchoTest",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "echo",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "foo",
				"name": "mw-ext-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "EchoTest",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "echo",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[Foo]]",
				"name": "mw-ext-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "UnstripTest",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "unstrip",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "foo",
				"name": "mw-ext-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#invoke",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "UnstripTest",
				"name": "mw-ext-ground unit mw-pagename mw-function-828"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "unstrip",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[Foo]]",
				"name": "mw-ext-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic links: internal link to RFC (T2479)",
		"wikitext": "[[RFC 123]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "RFC 123",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Magic links: RFC (T2479)",
		"wikitext": "RFC 822",
		"nodes": []
	},
	{
		"desc": "Magic links: RFC (T67278)",
		"wikitext": "This is RFC 822 but thisRFC 822 is not RFC 822linked.",
		"nodes": []
	},
	{
		"desc": "Magic links: RFC (w/ non-newline whitespace, T30950/T31025)",
		"wikitext": "RFC &nbsp;&#160;&#0160;&#xA0;&#Xa0; 822\nRFC\n822",
		"nodes": [
			{
				"text": "&nbsp;&#160;&#0160;&#xA0;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "Magic links: ISBN (T3937)",
		"wikitext": "ISBN 0-306-40615-2",
		"nodes": []
	},
	{
		"desc": "Magic links: ISBN (T67278)",
		"wikitext": "This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.",
		"nodes": []
	},
	{
		"desc": "Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)",
		"wikitext": "ISBN &nbsp;&#160;&#0160;&#xA0;&#Xa0; 978&nbsp;0&#160;316&#0160;09811&#xA0;3\nISBN\n9780316098113\nISBN 978\n0316098113",
		"nodes": [
			{
				"text": "&nbsp;&#160;&#0160;&#xA0;",
				"name": "mw-html-entity"
			},
			{
				"text": "&nbsp;",
				"name": "mw-html-entity"
			},
			{
				"text": "&#160;",
				"name": "mw-html-entity"
			},
			{
				"text": "&#0160;",
				"name": "mw-html-entity"
			},
			{
				"text": "&#xA0;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "Magic links: PMID incorrectly converts space to underscore",
		"wikitext": "PMID 1234",
		"nodes": []
	},
	{
		"desc": "Magic links: PMID (T67278)",
		"wikitext": "This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.",
		"nodes": []
	},
	{
		"desc": "Magic links: PMID (w/ non-newline whitespace, T30950/T31025)",
		"wikitext": "PMID &nbsp;&#160;&#0160;&#xA0;&#Xa0; 1234\nPMID\n1234",
		"nodes": [
			{
				"text": "&nbsp;&#160;&#0160;&#xA0;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "Magic links: use appropriate serialization for \"almost\" magic links.",
		"wikitext": "X[[Special:BookSources/0978739256|foo]]\n\nX[https://datatracker.ietf.org/doc/html/rfc1234 foo]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Special:BookSources/0978739256",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "https://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "datatracker.ietf.org/doc/html/rfc1234",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "foo",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Magic links: All disabled (T47942)",
		"wikitext": "ISBN 0-306-40615-2\nPMID 1234\nRFC 4321",
		"nodes": []
	},
	{
		"desc": "Magic links: html2wt of old wikitext when disabled (T47942)",
		"wikitext": "[[Special:BookSources/0306406152|ISBN 0-306-40615-2]]\n[//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract PMID 1234]\n[https://datatracker.ietf.org/doc/html/rfc4321 RFC 4321]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Special:BookSources/0306406152",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "ISBN 0-306-40615-2",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "//",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "PMID 1234",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "https://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "datatracker.ietf.org/doc/html/rfc4321",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "RFC 4321",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Prefer PMID magic link, no interwiki and magic links enabled (T145590#8608455)",
		"wikitext": "PMID 234",
		"nodes": []
	},
	{
		"desc": "Prefer PMID magic link, interwiki and magic links enabled (T145590#8608455)",
		"wikitext": "PMID 234",
		"nodes": []
	},
	{
		"desc": "Round-trip PMID interwiki, magic links enabled (T145590#8608455)",
		"wikitext": "[[pmid:234|PMID 234]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "pmid:234",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "PMID 234",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Prefer PMID interwiki, magic links disabled (T145590#8608455)",
		"wikitext": "[[pmid:234|PMID 234]]\n\n[https://datatracker.ietf.org/doc/html/rfc4321 RFC 4321]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "pmid:234",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "PMID 234",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "https://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "datatracker.ietf.org/doc/html/rfc4321",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "RFC 4321",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Preder PMID extlink if no interwiki, magic links disabled (T145590#8608455)",
		"wikitext": "[//www.ncbi.nlm.nih.gov/pubmed/234?dopt=Abstract PMID 234]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "//",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.ncbi.nlm.nih.gov/pubmed/234?dopt=Abstract",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "PMID 234",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Magic links inside links (not autolinked)",
		"wikitext": "[[Foo|http://example.com]]\n[[Foo|RFC 1234]]\n[[Foo|PMID 1234]]\n[[Foo|ISBN 123456789x]]\n\n[http://foo.com http://example.com]\n[http://foo.com RFC 1234]\n[http://foo.com PMID 1234]\n[http://foo.com ISBN 123456789x]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "http://example.com",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "RFC 1234",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "PMID 1234",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "ISBN 123456789x",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "foo.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "http://example.com",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "foo.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "RFC 1234",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "foo.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "PMID 1234",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "foo.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "ISBN 123456789x",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "WTS of magic word text (T109371)",
		"wikitext": "<nowiki>RFC 1234</nowiki>\n\n[http://foo.com RFC 1234]\n\n[[Foo|RFC 1234]]",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "RFC 1234",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "foo.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "RFC 1234",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "RFC 1234",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T4304: HTML attribute safety (ISBN)",
		"wikitext": "<div title=\"ISBN 1234567890\"></div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"ISBN 1234567890\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T4304: HTML attribute safety (RFC)",
		"wikitext": "<div title=\"RFC 1234\"></div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"RFC 1234\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T4304: HTML attribute safety (PMID)",
		"wikitext": "<div title=\"PMID 1234567890\"></div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "title=",
				"name": "attributeName"
			},
			{
				"text": "\"PMID 1234567890\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "ISBN code coverage",
		"wikitext": "ISBN  978-0-1234-56&#x20;789",
		"nodes": [
			{
				"text": "&#x20;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "ISBN followed by 5 spaces",
		"wikitext": "ISBN",
		"nodes": []
	},
	{
		"desc": "Double ISBN",
		"wikitext": "ISBN ISBN 1234567890",
		"nodes": []
	},
	{
		"desc": "ISBN with an X",
		"wikitext": "ISBN 3-462-04561-X\nISBN 3-462-04561-x\nISBN 080442957X\nISBN 080442957x\nISBN 978080442957X\nISBN 978080442957x",
		"nodes": []
	},
	{
		"desc": "ISBN with empty prefix (parsoid test)",
		"wikitext": "ISBN 1234567890",
		"nodes": []
	},
	{
		"desc": "T24905: <abbr> followed by ISBN followed by </a>",
		"wikitext": "<abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "abbr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "abbr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Double RFC",
		"wikitext": "RFC RFC 1234",
		"nodes": []
	},
	{
		"desc": "Double RFC with a wiki link",
		"wikitext": "RFC [[RFC 1234]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "RFC 1234",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "RFC code coverage",
		"wikitext": "RFC   983&#x20;987",
		"nodes": [
			{
				"text": "&#x20;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "ISBN with a dummy number",
		"wikitext": "ISBN ---",
		"nodes": []
	},
	{
		"desc": "ISBN with space-delimited number",
		"wikitext": "ISBN 92 9017 032 8",
		"nodes": []
	},
	{
		"desc": "ISBN with multiple spaces, no number",
		"wikitext": "ISBN  foo",
		"nodes": []
	},
	{
		"desc": "ISBN length",
		"wikitext": "ISBN 123456789\n\nISBN 1234567890\n\nISBN 12345678901",
		"nodes": []
	},
	{
		"desc": "ISBN with trailing year (T9110)",
		"wikitext": "ISBN 1-234-56789-0 - 2006\n\nISBN 1 234 56789 0 - 2006",
		"nodes": []
	},
	{
		"desc": "Edited ISBN links not serializable as ISBN links should serialize as wikilinks\n(magic links enabled)",
		"wikitext": "[[Special:BookSources/1234567890|ISBN 1234567895]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Special:BookSources/1234567890",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "ISBN 1234567895",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Edited ISBN links not serializable as ISBN links should serialize as wikilinks\n(magic links disabled)",
		"wikitext": "[[Special:BookSources/1234567890|ISBN 1234567895]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Special:BookSources/1234567890",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "ISBN 1234567895",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Edited RFC links not serializable as RFC links should serialize as extlinks",
		"wikitext": "[https://datatracker.ietf.org/doc/html/rfc123 New RFC]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "https://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "datatracker.ietf.org/doc/html/rfc123",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "New RFC",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Edited PMID links not serializable as PMID links should serialize as extlinks",
		"wikitext": "[//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "//",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "New PMID",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Edited PMID links not serializable as PMID links should serialize as wikilinks if possible",
		"wikitext": "[[pmid:123|New PMID]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "pmid:123",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "New PMID",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Magic Word: {{CURRENTDAY}}",
		"wikitext": "{{CURRENTDAY}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "CURRENTDAY",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{CURRENTDAY2}}",
		"wikitext": "{{CURRENTDAY2}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "CURRENTDAY2",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{CURRENTDAYNAME}}",
		"wikitext": "{{CURRENTDAYNAME}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "CURRENTDAYNAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{CURRENTDOW}}",
		"wikitext": "{{CURRENTDOW}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "CURRENTDOW",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{CURRENTMONTH}}",
		"wikitext": "{{CURRENTMONTH}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "CURRENTMONTH",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{CURRENTMONTH1}}",
		"wikitext": "{{CURRENTMONTH1}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "CURRENTMONTH1",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{CURRENTMONTHABBREV}}",
		"wikitext": "{{CURRENTMONTHABBREV}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "CURRENTMONTHABBREV",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{CURRENTMONTHNAME}}",
		"wikitext": "{{CURRENTMONTHNAME}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "CURRENTMONTHNAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{CURRENTMONTHNAMEGEN}}",
		"wikitext": "{{CURRENTMONTHNAMEGEN}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "CURRENTMONTHNAMEGEN",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{CURRENTTIME}}",
		"wikitext": "{{CURRENTTIME}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "CURRENTTIME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{CURRENTHOUR}}",
		"wikitext": "{{CURRENTHOUR}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "CURRENTHOUR",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{CURRENTWEEK}} (T6594)",
		"wikitext": "{{CURRENTWEEK}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "CURRENTWEEK",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{CURRENTYEAR}}",
		"wikitext": "{{CURRENTYEAR}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "CURRENTYEAR",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{CURRENTTIMESTAMP}}",
		"wikitext": "{{CURRENTTIMESTAMP}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "CURRENTTIMESTAMP",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Words LOCAL (UTC)",
		"wikitext": "*{{LOCALMONTH}}\n*{{LOCALMONTH1}}\n*{{LOCALMONTHNAME}}\n*{{LOCALMONTHNAMEGEN}}\n*{{LOCALMONTHABBREV}}\n*{{LOCALDAY}}\n*{{LOCALDAY2}}\n*{{LOCALDAYNAME}}\n*{{LOCALYEAR}}\n*{{LOCALTIME}}\n*{{LOCALHOUR}}\n*{{LOCALWEEK}}\n*{{LOCALDOW}}\n*{{LOCALTIMESTAMP}}",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "LOCALMONTH",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "LOCALMONTH1",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "LOCALMONTHNAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "LOCALMONTHNAMEGEN",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "LOCALMONTHABBREV",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "LOCALDAY",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "LOCALDAY2",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "LOCALDAYNAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "LOCALYEAR",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "LOCALTIME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "LOCALHOUR",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "LOCALWEEK",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "LOCALDOW",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "LOCALTIMESTAMP",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{FULLPAGENAME}}",
		"wikitext": "{{FULLPAGENAME}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "FULLPAGENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{FULLPAGENAMEE}}",
		"wikitext": "{{FULLPAGENAMEE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "FULLPAGENAMEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{TALKSPACE}}",
		"wikitext": "{{TALKSPACE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "TALKSPACE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{TALKSPACE}}, same namespace",
		"wikitext": "{{TALKSPACE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "TALKSPACE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{TALKSPACE}}, main namespace",
		"wikitext": "{{TALKSPACE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "TALKSPACE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{TALKSPACEE}}",
		"wikitext": "{{TALKSPACEE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "TALKSPACEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{SUBJECTSPACE}}",
		"wikitext": "{{SUBJECTSPACE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SUBJECTSPACE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{SUBJECTSPACE}}, same namespace",
		"wikitext": "{{SUBJECTSPACE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SUBJECTSPACE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{SUBJECTSPACE}}, main namespace",
		"wikitext": "{{SUBJECTSPACE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SUBJECTSPACE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{SUBJECTSPACEE}}",
		"wikitext": "{{SUBJECTSPACEE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SUBJECTSPACEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{NAMESPACE}}",
		"wikitext": "{{NAMESPACE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "NAMESPACE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{NAMESPACEE}}",
		"wikitext": "{{NAMESPACEE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "NAMESPACEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{NAMESPACENUMBER}}",
		"wikitext": "{{NAMESPACENUMBER}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "NAMESPACENUMBER",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{SUBPAGENAME}}",
		"wikitext": "{{SUBPAGENAME}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SUBPAGENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{SUBPAGENAMEE}}",
		"wikitext": "{{SUBPAGENAMEE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SUBPAGENAMEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{ROOTPAGENAME}}",
		"wikitext": "{{ROOTPAGENAME}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "ROOTPAGENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{ROOTPAGENAMEE}}",
		"wikitext": "{{ROOTPAGENAMEE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "ROOTPAGENAMEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{BASEPAGENAME}}",
		"wikitext": "{{BASEPAGENAME}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "BASEPAGENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{BASEPAGENAMEE}}",
		"wikitext": "{{BASEPAGENAMEE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "BASEPAGENAMEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{TALKPAGENAME}}",
		"wikitext": "{{TALKPAGENAME}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "TALKPAGENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{TALKPAGENAMEE}}",
		"wikitext": "{{TALKPAGENAMEE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "TALKPAGENAMEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{SUBJECTPAGENAME}}",
		"wikitext": "{{SUBJECTPAGENAME}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SUBJECTPAGENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{SUBJECTPAGENAMEE}}",
		"wikitext": "{{SUBJECTPAGENAMEE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SUBJECTPAGENAMEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{NUMBEROFFILES}}",
		"wikitext": "{{NUMBEROFFILES}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "NUMBEROFFILES",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{PAGENAME}}",
		"wikitext": "{{PAGENAME}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PAGENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{PAGENAME}} with metacharacters",
		"wikitext": "''{{PAGENAME}}''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PAGENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Magic Word: {{PAGENAME}} with metacharacters (T28781)",
		"wikitext": "{{PAGENAME}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PAGENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{PAGENAMEE}}",
		"wikitext": "{{PAGENAMEE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PAGENAMEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{PAGENAMEE}} with metacharacters (T28781)",
		"wikitext": "{{PAGENAMEE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PAGENAMEE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{REVISIONID}} on latest revision",
		"wikitext": "{{REVISIONID}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONID",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{REVISIONID}} on non-latest revision",
		"wikitext": "{{REVISIONID}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONID",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{REVISIONTIMESTAMP}} on latest revision",
		"wikitext": "{{REVISIONTIMESTAMP}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONTIMESTAMP",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{REVISIONTIMESTAMP:{{PAGENAME}}}} on latest revision",
		"wikitext": "{{REVISIONTIMESTAMP:{{PAGENAME}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONTIMESTAMP",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "PAGENAME",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{REVISIONTIMESTAMP}} on not-yet-existing current page",
		"wikitext": "{{REVISIONTIMESTAMP}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONTIMESTAMP",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{REVISIONTIMESTAMP:{{PAGENAME}}}} on not-yet-existing current page",
		"wikitext": "{{REVISIONTIMESTAMP:{{PAGENAME}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONTIMESTAMP",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "PAGENAME",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{REVISIONTIMESTAMP:...}}} on non-existing non-current page",
		"wikitext": "{{REVISIONTIMESTAMP:This page does not exist}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONTIMESTAMP",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "This page does not exist",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{REVISIONUSER}} on latest revision",
		"wikitext": "{{REVISIONUSER}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONUSER",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{REVISIONUSER}} on not-yet-existing current page",
		"wikitext": "{{REVISIONUSER}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONUSER",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{REVISIONUSER:{{PAGENAME}}}} on not-yet-existing current page",
		"wikitext": "{{REVISIONUSER:{{PAGENAME}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONUSER",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "PAGENAME",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{REVISIONUSER:...}} on non-existing non-current page",
		"wikitext": "{{REVISIONUSER:This page does not exist}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONUSER",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "This page does not exist",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{REVISIONUSER}} on non-latest revision",
		"wikitext": "{{REVISIONUSER}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONUSER",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Parser Function: {{REVISIONID:{{PAGENAME}}}} on latest revision",
		"wikitext": "{{REVISIONID:{{PAGENAME}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONID",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "PAGENAME",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Parser Function: {{REVISIONID:{{PAGENAME}}}} on non-saved revision",
		"wikitext": "{{REVISIONID:{{PAGENAME}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONID",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "PAGENAME",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Parser Function: {{REVISIONDAY}} on latest revision",
		"wikitext": "{{REVISIONDAY}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONDAY",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Parser Function: {{REVISIONDAY:{{PAGENAME}}}} on latest revision",
		"wikitext": "{{REVISIONDAY:{{PAGENAME}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONDAY",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "PAGENAME",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Parser Function: {{REVISIONMONTH}} on latest revision",
		"wikitext": "{{REVISIONMONTH}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONMONTH",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Parser Function: {{REVISIONMONTH:{{PAGENAME}}}} on latest revision",
		"wikitext": "{{REVISIONMONTH:{{PAGENAME}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONMONTH",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "PAGENAME",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Parser Function: {{REVISIONYEAR:{{PAGENAME}}}} on latest revision",
		"wikitext": "{{REVISIONYEAR:{{PAGENAME}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONYEAR",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "PAGENAME",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Parser Function: {{PAGESIZE:{{PAGENAME}}}} on latest revision",
		"wikitext": "{{PAGESIZE:{{PAGENAME}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PAGESIZE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "PAGENAME",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Parser functions with interwiki titles (T355706)",
		"wikitext": "* {{PAGEID:Parser test}} - {{PAGEID:wikipedia:Parser test}}\n* {{PAGESIZE:Parser test}} - {{PAGESIZE:wikipedia:Parser test}}\n* {{REVISIONID:Parser test}} - {{REVISIONID:wikipedia:Parser test}}\n* {{REVISIONDAY:Parser test}} - {{REVISIONDAY:wikipedia:Parser test}}\n* {{REVISIONDAY2:Parser test}} - {{REVISIONDAY2:wikipedia:Parser test}}\n* {{REVISIONMONTH:Parser test}} - {{REVISIONMONTH:wikipedia:Parser test}}\n* {{REVISIONMONTH1:Parser test}} - {{REVISIONMONTH1:wikipedia:Parser test}}\n* {{REVISIONYEAR:Parser test}} - {{REVISIONYEAR:wikipedia:Parser test}}\n* {{REVISIONTIMESTAMP:Parser test}} - {{REVISIONTIMESTAMP:wikipedia:Parser test}}\n* {{REVISIONUSER:Parser test}} - {{REVISIONUSER:wikipedia:Parser test}}",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PAGEID",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PAGEID",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "wikipedia:Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PAGESIZE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PAGESIZE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "wikipedia:Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONID",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONID",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "wikipedia:Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONDAY",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONDAY",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "wikipedia:Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONDAY2",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONDAY2",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "wikipedia:Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONMONTH",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONMONTH",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "wikipedia:Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONMONTH1",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONMONTH1",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "wikipedia:Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONYEAR",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONYEAR",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "wikipedia:Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONTIMESTAMP",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONTIMESTAMP",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "wikipedia:Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONUSER",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "REVISIONUSER",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "wikipedia:Parser test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{SCRIPTPATH}}",
		"wikitext": "{{SCRIPTPATH}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SCRIPTPATH",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{STYLEPATH}}",
		"wikitext": "{{STYLEPATH}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "STYLEPATH",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{SERVER}}",
		"wikitext": "{{SERVER}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SERVER",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{SERVERNAME}}",
		"wikitext": "{{SERVERNAME}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SERVERNAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{SITENAME}}",
		"wikitext": "{{SITENAME}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SITENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language",
		"wikitext": "{{PAGELANGUAGE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "PAGELANGUAGE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{USERLANGUAGE}} disabled",
		"wikitext": "{{USERLANGUAGE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "USERLANGUAGE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: {{USERLANGUAGE}} enabled",
		"wikitext": "{{USERLANGUAGE}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "USERLANGUAGE",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Case-sensitive magic words, when cased differently, should just be template transclusions",
		"wikitext": "{{CurrentMonth}}\n{{currentday}}\n{{cURreNTweEK}}\n{{currentHour}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "CurrentMonth",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "currentday",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "cURreNTweEK",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "currentHour",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Case-insensitive magic words should still work with weird casing.",
		"wikitext": "{{sErVeRNaMe}}\n{{LCFirst:AOEU}}\n{{ucFIRST:aoeu}}\n{{SERver}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "sErVeRNaMe",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "LCFirst",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "AOEU",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "ucFIRST",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "aoeu",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "SERver",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Magic Word: prioritize type info over data-parsoid",
		"wikitext": "__FORCETOC__",
		"nodes": [
			{
				"text": "__FORCETOC__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "Magic Word: serialize on separate line (parsoid)",
		"wikitext": "foo\n__NOTOC__\nbar",
		"nodes": [
			{
				"text": "__NOTOC__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "Magic Word: case-insensitive (all-lowercase)",
		"wikitext": "foo\n__notoc__\nbar",
		"nodes": [
			{
				"text": "__notoc__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "Magic Word: case-insensitive (mixed case)",
		"wikitext": "foo\n__NOtOC__\nbar",
		"nodes": [
			{
				"text": "__NOtOC__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "Magic words",
		"wikitext": "__TOC__\n__NOTOC__\n__FORCETOC__\n__INDEX__\n__NOINDEX__\n__NOGALLERY__\n__NOEDITSECTION__\n__NOTITLECONVERT__\n__NOCONTENTCONVERT__",
		"nodes": [
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "__NOTOC__",
				"name": "controlKeyword"
			},
			{
				"text": "__FORCETOC__",
				"name": "controlKeyword"
			},
			{
				"text": "__INDEX__",
				"name": "controlKeyword"
			},
			{
				"text": "__NOINDEX__",
				"name": "controlKeyword"
			},
			{
				"text": "__NOGALLERY__",
				"name": "controlKeyword"
			},
			{
				"text": "__NOEDITSECTION__",
				"name": "controlKeyword"
			},
			{
				"text": "__NOTITLECONVERT__",
				"name": "controlKeyword"
			},
			{
				"text": "__NOCONTENTCONVERT__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "NOGALLERY sets flag",
		"wikitext": "__NOGALLERY__",
		"nodes": [
			{
				"text": "__NOGALLERY__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "1. HIDDENCAT sets tracking category on category page",
		"wikitext": "__HIDDENCAT__",
		"nodes": [
			{
				"text": "__HIDDENCAT__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "2. HIDDENCAT sets tracking category on category page",
		"wikitext": "__HIDDENCAT__",
		"nodes": [
			{
				"text": "__HIDDENCAT__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "New section link / no new section link",
		"wikitext": "__NEWSECTIONLINK__ __NONEWSECTIONLINK__",
		"nodes": [
			{
				"text": "__NEWSECTIONLINK__",
				"name": "controlKeyword"
			},
			{
				"text": "__NONEWSECTIONLINK__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "Templated new section link",
		"wikitext": "{{NewSectionLink}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "NewSectionLink",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Simple image",
		"wikitext": "[[Image:foobar.jpg]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Simple image redirect",
		"wikitext": "[[Image:Redirect to foobar.jpg]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Redirect to foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Simple image (using File: namespace, now canonical)",
		"wikitext": "[[File:Foobar.jpg]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Right-aligned image",
		"wikitext": "[[File:Foobar.jpg|right]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with caption",
		"wikitext": "[[File:Foobar.jpg|right|Caption text]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Caption text",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with caption, T55312 #1",
		"wikitext": "[[File:Foobar.jpg|right|Caption page stuff]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Caption page stuff",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with caption, T55312 #2",
		"wikitext": "[[File:Foobar.jpg|right|Caption page=]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Caption page=",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with caption, T55312 #3",
		"wikitext": "[[File:Foobar.jpg|right|Caption page=stuff]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Caption page=stuff",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image caption with pipe entity",
		"wikitext": "[[File:Foobar.jpg|thumb|one &#x7C; two]]\n[[File:Foobar.jpg|thumb|one ''two'' &#x7C; three]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "one ",
				"name": "mw-link-ground string"
			},
			{
				"text": "&#x7C;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": " two",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "one ",
				"name": "mw-link-ground string"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "two",
				"name": "mw-link-ground string mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": " ",
				"name": "mw-link-ground string"
			},
			{
				"text": "&#x7C;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": " three",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Bad images - basic functionality",
		"wikitext": "[[File:Bad.jpg]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Bad.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Bad images - T18039: text after bad image disappears",
		"wikitext": "Foo bar\n[[File:Bad.jpg]]\nBar foo",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Bad.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Bad images - manualthumb",
		"wikitext": "[[File:Foobar.jpg|thumbnail=Bad.jpg|Uh oh]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumbnail=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Bad.jpg",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Uh oh",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Bad images - in gallery",
		"wikitext": "<gallery>\nFile:Bad.jpg\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Bad.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Allow empty links in image captions (T62753)",
		"wikitext": "[[File:Foobar.jpg|thumb|Caption [[Link1]]\n[[]]\n[[Link2]]\n]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Caption ",
				"name": "mw-link-ground string"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Link1",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Link2",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Titles in unlinked images (T23454)",
		"wikitext": "[[File:Foobar.jpg|link=|stuff]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "stuff",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Unlinked media in gallery",
		"wikitext": "<gallery>\nFile:Foobar.jpg|link=|stuff\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "link=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "stuff",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Link with empty target",
		"wikitext": "[[]]",
		"nodes": []
	},
	{
		"desc": "Image with link trail",
		"wikitext": "Linktrails should not work for images: [[File:Foobar.jpg]]s",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with empty attribute",
		"wikitext": "[[File:Foobar.jpg|right||Caption text]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "||",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Caption text",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "1. Block image with individual attributes from templates",
		"wikitext": "[[File:Foobar.jpg|thumb|{{1x|137px}}|This is a caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "137px",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "This is a caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "2. Block Image with individual attributes from templates",
		"wikitext": "[[File:Foobar.jpg|{{1x|thumb}}|{{1x|137px}}|This is a caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "thumb",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "137px",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "This is a caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "3. Inline image with individual attributes from templates",
		"wikitext": "[[File:Foobar.jpg|{{1x|50px}}]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "50px",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with multiple attributes from the same template",
		"wikitext": "[[File:Foobar.jpg|{{image_attribs}}]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "image_attribs",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with link tails",
		"wikitext": "123[[File:Foobar.jpg]]456\n123[[File:Foobar.jpg|right]]456\n123[[File:Foobar.jpg|thumb]]456",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with multiple captions -- only last one is accepted",
		"wikitext": "[[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Caption1 - ignored",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Caption2",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": " - ignored",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Caption3 - accepted",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with multiple widths -- use last",
		"wikitext": "[[File:Foobar.jpg|200px|300px|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "200px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "300px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with multiple alignments -- use first (T50664)",
		"wikitext": "[[File:Foobar.jpg|thumb|left|right|center|caption]]\n\n[[File:Foobar.jpg|middle|text-top|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "left",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "center",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "middle",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "text-top",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with width attribute at different positions",
		"wikitext": "[[File:Foobar.jpg|200px|right|Caption]]\n[[File:Foobar.jpg|right|200px|Caption]]\n[[File:Foobar.jpg|right|Caption|200px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "200px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "200px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "200px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with size specified with pxpx (T15500, T53628)",
		"wikitext": "[[File:Foobar.jpg|20pxpx]]\n[[File:Foobar.jpg|200x20pxpx]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "20pxpx",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "200x20pxpx",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T374311: Gallery with trailing px should not trigger double-px",
		"wikitext": "<gallery widths=\"100px\">\nFile:Foobar.jpg\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "widths=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"100px\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Image with link parameter, wiki target",
		"wikitext": "[[File:Foobar.jpg|link=Main Page]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "File with link to page section",
		"wikitext": "[[Main Page#section]]\n[[File:Foobar.jpg|link=Main Page#section]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "section",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Main Page#section",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with link parameter, URL target",
		"wikitext": "[[File:Foobar.jpg|link=http://example.com/]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "http://example.com/",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with link parameter, protocol-less URL target",
		"wikitext": "[[File:Foobar.jpg|link=//example.com/]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "//example.com/",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Escaping non-block captions (T107435)",
		"wikitext": "[[Image:Foobar.jpg|alt=123|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=123|caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with link parameter, wgExternalLinkTarget",
		"wikitext": "[[File:Foobar.jpg|link=http://example.com/]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "http://example.com/",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Thumb with link parameter, wgExternalLinkTarget",
		"wikitext": "[[File:Foobar.jpg|link=http://example.com/|thumb]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "http://example.com/",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with link parameter, wgNoFollowLinks set to false",
		"wikitext": "[[File:Foobar.jpg|link=http://example.com/]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "http://example.com/",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with link parameter, wgNoFollowDomainExceptions",
		"wikitext": "[[File:Foobar.jpg|link=http://example.com/]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "http://example.com/",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with link parameter, wgExternalLinkTarget, unnamed parameter",
		"wikitext": "[[File:Foobar.jpg|link=http://example.com/|Title]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "http://example.com/",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Title",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with empty link parameter",
		"wikitext": "[[File:Foobar.jpg|link=]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with link parameter (wiki target) and unnamed parameter",
		"wikitext": "[[File:Foobar.jpg|link=Main_Page|Title]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Main_Page",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Title",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with link parameter (URL target) and unnamed parameter",
		"wikitext": "[[File:Foobar.jpg|link=http://example.com/|Title]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "http://example.com/",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Title",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Thumbnail image with link parameter",
		"wikitext": "[[File:Foobar.jpg|thumb|link=http://example.com/|Title]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "http://example.com/",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Title",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Manually-specified thumbnail image",
		"wikitext": "[[File:Foobar.jpg|thumbnail=Thumb.png|Title]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumbnail=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Thumb.png",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Title",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Manually-specified thumbnail image (backwards compat)",
		"wikitext": "[[File:Foobar.jpg|thumbnail=Thumb.png|Title]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumbnail=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Thumb.png",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Title",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Manually-specified thumbnail image with explicit link to wiki page",
		"wikitext": "[[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Thumb.png",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Main_Page",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Title",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Manually-specified thumbnail image with explicit link to url",
		"wikitext": "[[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Thumb.png",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "http://example.com",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Title",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Manually-specified thumbnail image with explicit no link",
		"wikitext": "[[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Thumb.png",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Title",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Manually-specified thumbnail image with explicit link and alt text",
		"wikitext": "[[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Thumb.png",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Main_Page",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "alttext",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Title",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with frame and link",
		"wikitext": "[[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frame",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "left",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "This is a test image ",
				"name": "mw-link-ground string"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with frame and link and explicit alt",
		"wikitext": "[[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frame|left|This is a test image ",
				"name": "mw-link-ground string"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with wiki markup in implicit alt",
		"wikitext": "[[Image:Foobar.jpg|testing '''bold''' in alt]]\n\n[[Image:Foobar.jpg|alt=testing '''bold''' in alt]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "testing ",
				"name": "mw-link-ground string"
			},
			{
				"text": "'''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "bold",
				"name": "mw-link-ground string mw-strong"
			},
			{
				"text": "'''",
				"name": "mw-link-ground string character"
			},
			{
				"text": " in alt",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=testing ",
				"name": "mw-link-ground string"
			},
			{
				"text": "'''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "bold",
				"name": "mw-link-ground string mw-strong"
			},
			{
				"text": "'''",
				"name": "mw-link-ground string character"
			},
			{
				"text": " in alt",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Alt image option should handle most kinds of wikitext without barfing",
		"wikitext": "[[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{1x|''bold template''}}.]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb|This is the image caption|alt=This is a ",
				"name": "mw-link-ground string"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "link",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "''bold template''",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Ampersand in alt attribute (T206940)",
		"wikitext": "[[File:Foobar.jpg|alt=&amp;amp;]]\n\n<!-- consistency with gallery extension -->\n<gallery>\nFile:Foobar.jpg|alt=&amp;amp;\n</gallery>",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "&amp;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "amp;",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<!-- consistency with gallery extension -->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "&amp;",
				"name": "mw-tag-gallery mw-html-entity"
			},
			{
				"text": "amp;",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Link with encoded pipe in alt option",
		"wikitext": "[[File:Foobar.jpg|alt=http://testing.123?4=5&#x7C;6|caption]]\n\n[[File:Foobar.jpg|alt=http://testing.123?4=5&vert;6|caption]]\n\n<!-- consistency with gallery extension -->\n<gallery>\nFile:Foobar.jpg|alt=http://testing.123?4=5&#x7C;6|caption\nFile:Foobar.jpg|alt=http://testing.123?4=5&vert;6|caption\n</gallery>",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "http://testing.123?4=5",
				"name": "mw-link-ground string"
			},
			{
				"text": "&#x7C;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "6",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "http://testing.123?4=5",
				"name": "mw-link-ground string"
			},
			{
				"text": "&vert;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "6",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<!-- consistency with gallery extension -->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "http://testing.123?4=5",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "&#x7C;",
				"name": "mw-tag-gallery mw-html-entity"
			},
			{
				"text": "6",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "caption",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "http://testing.123?4=5",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "&vert;",
				"name": "mw-tag-gallery mw-html-entity"
			},
			{
				"text": "6",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "caption",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Italics markup in alt attribute (T206940)",
		"wikitext": "[[File:Foobar.jpg|alt=''x''|caption]]\n\n<!-- consistency with gallery extension -->\n<gallery>\nFile:Foobar.jpg|alt=''x''|caption\n</gallery>",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "x",
				"name": "mw-link-ground string mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<!-- consistency with gallery extension -->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "''",
				"name": "mw-tag-gallery string character"
			},
			{
				"text": "x",
				"name": "mw-tag-gallery string mw-em"
			},
			{
				"text": "''",
				"name": "mw-tag-gallery string character"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "caption",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Nowiki markup in alt attribute (edited html, no data-parsoid) (T206940)",
		"wikitext": "[[File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption]]\n\n<!-- consistency with gallery extension -->\n<gallery>\nFile:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption\n</gallery>",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''x''",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<!-- consistency with gallery extension -->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "<",
				"name": "mw-tag-gallery mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-tag-gallery mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-tag-gallery mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''x''",
				"name": "mw-tag-gallery mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-tag-gallery mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-tag-gallery mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-tag-gallery mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "caption",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Ampersand in link attribute (edited html, no data-parsoid) (T206940)",
		"wikitext": "[[File:Foobar.jpg|link=Foo_&_bar]]\n\n<!-- consistency with gallery extension -->\n<gallery>\nFile:Foobar.jpg|link=Foo_&_bar\n</gallery>",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Foo_&_bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<!-- consistency with gallery extension -->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "link=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "Foo_&_bar",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Italics markup in link attribute (T206940)",
		"wikitext": "[[Foo''s bar''s]]\n\n<!-- Note that \"italics\" are stripped, even though this is a valid page title -->\n[[File:Foobar.jpg|link=Foo''s bar''s|caption1]]\n\n[[File:Foobar.jpg|link=''Main Page''|caption2]]\n\n<!-- consistency with gallery extension -->\n<gallery>\nFile:Foobar.jpg|link=Foo''s bar''s|caption1\nFile:Foobar.jpg|link=''Main Page''|caption2\n</gallery>",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo''s bar''s",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<!-- Note that \"italics\" are stripped, even though this is a valid page title -->",
				"name": "comment"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "s bar",
				"name": "mw-link-ground string mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "s",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption1",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground string mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption2",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<!-- consistency with gallery extension -->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "link=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "Foo",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "''",
				"name": "mw-tag-gallery string character"
			},
			{
				"text": "s bar",
				"name": "mw-tag-gallery string mw-em"
			},
			{
				"text": "''",
				"name": "mw-tag-gallery string character"
			},
			{
				"text": "s",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "caption1",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "link=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "''",
				"name": "mw-tag-gallery string character"
			},
			{
				"text": "Main Page",
				"name": "mw-tag-gallery string mw-em"
			},
			{
				"text": "''",
				"name": "mw-tag-gallery string character"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "caption2",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Nowiki markup in link attribute (edited html, no data-parsoid) (T206940)",
		"wikitext": "[[File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption]]\n\n<!-- consistency with gallery extension -->\n<gallery>\nFile:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption\n</gallery>",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''s_bar''",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "s",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<!-- consistency with gallery extension -->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "link=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "Foo",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "<",
				"name": "mw-tag-gallery mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-tag-gallery mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-tag-gallery mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''s_bar''",
				"name": "mw-tag-gallery mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-tag-gallery mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-tag-gallery mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-tag-gallery mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "s",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "caption",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "HTML entity prefix in link markup (T209236)",
		"wikitext": "[[File:Foobar.jpg|link=https://example.com?foo&params=bar]]\n\n<!-- consistency with gallery extension -->\n<gallery>\nFile:Foobar.jpg|link=https://example.com?foo&params=bar\n</gallery>",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "https://example.com?foo&params=bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<!-- consistency with gallery extension -->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "link=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "https://example.com?foo&params=bar",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Image with table with attributes in caption",
		"wikitext": "[[File:Foobar.jpg|thumb|\n{| class=\"123\" |\n|- class=\"456\" |\n| ha\n|}\n]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "class=",
				"name": "mw-link-ground definitionOperator"
			},
			{
				"text": "\"123\"",
				"name": "mw-link-ground mw-table-definition-value"
			},
			{
				"text": " |",
				"name": "mw-link-ground definitionOperator"
			},
			{
				"text": "|- ",
				"name": "mw-link-ground typeOperator"
			},
			{
				"text": "class=",
				"name": "mw-link-ground definitionOperator"
			},
			{
				"text": "\"456\"",
				"name": "mw-link-ground mw-table-definition-value"
			},
			{
				"text": " |",
				"name": "mw-link-ground definitionOperator"
			},
			{
				"text": "| ",
				"name": "mw-link-ground typeOperator"
			},
			{
				"text": "ha",
				"name": "mw-link-ground"
			},
			{
				"text": "|}",
				"name": "mw-link-ground null"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with table with rows from templates in caption",
		"wikitext": "[[File:Foobar.jpg|thumb|\n{|\n{{1x|{{!}} hi}}\n|}\n]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-link-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-link-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-link-ground paren"
			},
			{
				"text": " hi",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "|}",
				"name": "mw-link-ground null"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with nested tables in caption",
		"wikitext": "[[File:Foobar.jpg|thumb|Foo<br />\n{|\n|\n{|\n|z\n|}\n|}\n]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "br ",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "/>",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "mw-link-ground typeOperator"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "mw-link-ground typeOperator"
			},
			{
				"text": "z",
				"name": "mw-link-ground"
			},
			{
				"text": "|}",
				"name": "mw-link-ground null"
			},
			{
				"text": "|}",
				"name": "mw-link-ground null"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with heading and horizontal rule in caption",
		"wikitext": "[[File:Foobar.jpg|thumb|\n===Testing===\n123\n--------------\n]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "===Testing===",
				"name": "mw-link-ground string"
			},
			{
				"text": "123",
				"name": "mw-link-ground string"
			},
			{
				"text": "--------------",
				"name": "contentSeparator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with 'frameless' first.",
		"wikitext": "[[File:Foobar.jpg|frameless|caption]]\n\n[[File:Foobar.jpg|frameless|frame|caption]]\n\n[[File:Foobar.jpg|frameless|thumb|caption]]\n\n[[File:Foobar.jpg|frameless|thumbnail=Thumb.png|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frameless",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frameless",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frame",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frameless",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frameless",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumbnail=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Thumb.png",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with 'frame' first.",
		"wikitext": "[[File:Foobar.jpg|frame|caption]]\n[[File:Foobar.jpg|frame|frameless|caption]]\n[[File:Foobar.jpg|frame|thumb|caption]]\n[[File:Foobar.jpg|frame|thumbnail=Thumb.png|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frame",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frame",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frameless",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frame",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frame",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumbnail=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Thumb.png",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with 'thumb' first.",
		"wikitext": "[[File:Foobar.jpg|thumb|caption]]\n[[File:Foobar.jpg|thumb|frameless|caption]]\n[[File:Foobar.jpg|thumb|frame|caption]]\n[[File:Foobar.jpg|thumb|thumbnail=Thumb.png|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frameless",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frame",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumbnail=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Thumb.png",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with 'thumbnail=' first.",
		"wikitext": "[[File:Foobar.jpg|thumbnail=Thumb.png|caption]]\n[[File:Foobar.jpg|thumbnail=Thumb.png|frameless|caption]]\n[[File:Foobar.jpg|thumbnail=Thumb.png|frame|caption]]\n[[File:Foobar.jpg|thumbnail=Thumb.png|thumb|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumbnail=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Thumb.png",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumbnail=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Thumb.png",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frameless",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumbnail=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Thumb.png",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frame",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumbnail=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Thumb.png",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: unspecified format and border enlarge",
		"wikitext": "[[File:Foobar.jpg|2000px]]\n\n[[File:Foobar.jpg|border|2000px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "2000px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "border",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "2000px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: \"unspecified format\" and border reduce",
		"wikitext": "[[File:Foobar.jpg|1000px]]\n\n[[File:Foobar.jpg|border|1000px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "1000px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "border",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "1000px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: thumbs reduce",
		"wikitext": "[[File:Foobar.jpg|thumb|50px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "50px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: bitmap thumbs can't be enlarged past original size, but vector can.",
		"wikitext": "[[File:Foobar.jpg|thumb|2000px]]\n\n[[File:Foobar.svg|thumb|2000px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "2000px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.svg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "2000px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: frameless can reduce in size",
		"wikitext": "[[File:Foobar.jpg|frameless|50px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frameless",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "50px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: bitmap frameless can't be enlarged past original size, but vector can",
		"wikitext": "[[File:Foobar.jpg|frameless|2000px]]\n\n[[File:Foobar.svg|frameless|2000px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frameless",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "2000px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.svg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frameless",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "2000px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: framed images are always unscaled.",
		"wikitext": "[[File:Foobar.jpg|frame]]\n\n[[File:Foobar.jpg|frame|50px]]\n\n[[File:Foobar.jpg|frame|50x50px]]\n\n[[File:Foobar.jpg|frame|2000px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frame",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frame",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "50px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frame",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "50x50px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frame",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "2000px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: framed vector images are scaled to their default size AND have srcset",
		"wikitext": "[[File:Foobar.svg|frame]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.svg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frame",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: manualthumb images are always unscaled.",
		"wikitext": "[[File:Foobar.jpg|thumbnail=Thumb.png]]\n\n[[File:Foobar.jpg|thumbnail=Thumb.png|50px]]\n\n[[File:Foobar.jpg|thumbnail=Thumb.png|50x50px]]\n\n[[File:Foobar.jpg|thumbnail=Thumb.png|2000px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumbnail=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Thumb.png",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumbnail=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Thumb.png",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "50px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumbnail=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Thumb.png",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "50x50px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumbnail=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Thumb.png",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "2000px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Bogus sizes during html2wt",
		"wikitext": "[[File:Foobar.jpg]]\n\n[[File:Foobar.jpg|10x10px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "10x10px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Link to image page- image page normally doesn't exist, hence edit link\nAdd test with existing image page\n#<p><a href=\"/wiki/File:Test\" title=\"Image:Test\">Image:test</a>",
		"wikitext": "[[:Image:test]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Image:test",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T20784  Link to non-existent image page with caption should use caption as link text",
		"wikitext": "[[:Image:test|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Image:test",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Frameless image caption with a free URL",
		"wikitext": "[[File:Foobar.jpg|http://example.com]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "http://example.com",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Thumbnail image caption with a free URL",
		"wikitext": "[[File:Foobar.jpg|thumb|http://example.com]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "http://example.com",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Thumbnail image caption with a free URL and explicit alt",
		"wikitext": "[[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "http://example.com",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Alteration",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "SVG thumbnails with native SVG rendering",
		"wikitext": "[[File:Foobar.svg|thumb|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.svg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "SVG thumbnails with no language set",
		"wikitext": "[[File:Foobar.svg|thumb|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.svg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "SVG thumbnails with language de",
		"wikitext": "[[File:Foobar.svg|lang=de|thumb|caption]]\n\n<gallery>\nFile:Foobar.svg|lang=de|caption\n</gallery>",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.svg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "lang=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "de",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.svg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "lang=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "de",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "caption",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "SVG thumbnails with invalid language code",
		"wikitext": "[[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.svg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "lang=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "invalid:language:code",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T3887: A ISBN with a thumbnail",
		"wikitext": "[[File:Foobar.jpg|thumb|ISBN 1235467890]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "ISBN 1235467890",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T3887: A RFC with a thumbnail",
		"wikitext": "[[File:Foobar.jpg|thumb|This is RFC 12354]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "This is RFC 12354",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T3887: A mailto link with a thumbnail",
		"wikitext": "[[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Please mailto:nobody@example.com",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T2648: Frameless image caption with a link",
		"wikitext": "[[File:Foobar.jpg|text with a [[link]] in it]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "text with a ",
				"name": "mw-link-ground string"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "link",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": " in it",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T2648: Frameless image caption with a link (suffix)",
		"wikitext": "[[File:Foobar.jpg|text with a [[link]]foo in it]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "text with a ",
				"name": "mw-link-ground string"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "link",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "foo in it",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T2648: Frameless image caption with an interwiki link",
		"wikitext": "[[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "text with a ",
				"name": "mw-link-ground string"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "MeatBall:Link",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": " in it",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T2648: Frameless image caption with a piped interwiki link",
		"wikitext": "[[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "text with a ",
				"name": "mw-link-ground string"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "MeatBall:Link",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": " in it",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T107474: Frameless image caption with <nowiki>",
		"wikitext": "[[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "text with a [[MeatBall:Link|link]] in it",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Escape HTML special chars in image alt text",
		"wikitext": "[[File:Foobar.jpg|& < > \"]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "& < > \"",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Escape HTML special chars in image alt text with LanguageConverter",
		"wikitext": "[[File:Foobar.jpg|& < > \"]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "& < > \"",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Entities in file name and attributes",
		"wikitext": "[[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:7%25 solution.gif",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "manualthumb=7%25 solution.gif",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "7%25 solution",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "7%25 solution",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T2499: Alt text should have &#1234;, not &amp;1234;",
		"wikitext": "[[File:Foobar.jpg|&#9792;]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "&#9792;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Broken image caption with link",
		"wikitext": "[[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb|This is a broken caption. But ",
				"name": "mw-link-ground string"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "this",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image caption containing another image",
		"wikitext": "[[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "This is a caption with another ",
				"name": "mw-link-ground string"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Thumb.png",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "image",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": " inside it!",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: caption containing a newline",
		"wikitext": "[[File:Foobar.jpg|This\n*is some text]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "This",
				"name": "mw-link-ground string"
			},
			{
				"text": "*is some text",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: caption containing leading space",
		"wikitext": "[[File:Foobar.jpg|thumb| bar]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "| ",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: caption containing a table",
		"wikitext": "[[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table\n{|\n!Foo!!Bar\n|-\n|Foo1||Bar1\n|}\nand some more text.]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb|200px|This is an example image thumbnail caption with a table",
				"name": "mw-link-ground string"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "mw-link-ground typeOperator"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-strong"
			},
			{
				"text": "!!",
				"name": "mw-link-ground typeOperator"
			},
			{
				"text": "Bar",
				"name": "mw-link-ground mw-strong"
			},
			{
				"text": "|-",
				"name": "mw-link-ground typeOperator"
			},
			{
				"text": "|",
				"name": "mw-link-ground typeOperator"
			},
			{
				"text": "Foo1",
				"name": "mw-link-ground"
			},
			{
				"text": "||",
				"name": "mw-link-ground typeOperator"
			},
			{
				"text": "Bar1",
				"name": "mw-link-ground"
			},
			{
				"text": "|}",
				"name": "mw-link-ground null"
			},
			{
				"text": "and some more text.",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T5090: External links other than http: in image captions",
		"wikitext": "[[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "200x200px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "This caption has ",
				"name": "mw-link-ground string"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "irc://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.net",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "irc",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": " and ",
				"name": "mw-link-ground string"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "https://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "Secure",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": " ext links in it.",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Custom class",
		"wikitext": "[[Image:foobar.jpg|a|class=b]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "a|class=b",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "\"border\", \"frameless\" and \"class\" attributes on an image.",
		"wikitext": "[[File:Foobar.jpg|frameless|border|class=extra|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frameless",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "border",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "class=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "extra",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Invalid image attributes (T64500)",
		"wikitext": "[[File:Foobar.jpg|thumb|float|left|caption]]\n\n[[File:Foobar.jpg|thumb|righ|caption]]\n\n[[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "float",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "left",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "righ",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bogus1",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bogus2",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "left",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bogus3",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Redirected image",
		"wikitext": "[[Image:Barfoo.jpg]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Barfoo.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Missing image with uploads disabled",
		"wikitext": "[[File:Foobaz.jpg]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobaz.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - simple image with size and middle alignment",
		"wikitext": "[[File:Foobar.jpg|middle|50px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "middle",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "50px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias",
		"wikitext": "[[Image:Foobar.jpg|middle|50px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "middle|50px",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - simple image with size and middle alignment (existing content)",
		"wikitext": "[[File:Foobar.jpg|50px|middle]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "50px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "middle",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name",
		"wikitext": "[[Image:Foobar.jpg|50px|middle]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "50px|middle",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption",
		"wikitext": "[[File:Foobar.jpg|500x10px|baseline|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "500x10px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "baseline",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - simple image with border and size spec",
		"wikitext": "[[File:Foobar.jpg|50px|border|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "50px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "border",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - thumbnail with halign, valign, and caption",
		"wikitext": "[[File:Foobar.jpg|left|baseline|thumb|caption content]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "left",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "baseline",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption content",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)",
		"wikitext": "[[File:Foobar.jpg|thumb|left|baseline|caption content]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "left",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "baseline",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption content",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption",
		"wikitext": "[[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right|middle|thumb|50x50px|caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)",
		"wikitext": "[[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "50x50px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "middle",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - framed image with specific size and caption (size is ignored)",
		"wikitext": "[[File:Foobar.jpg|frame|500x50px|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frame",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "500x50px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)",
		"wikitext": "[[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "left",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "baseline",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frame",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "500x50px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - frameless image with specific size, border, and caption",
		"wikitext": "[[File:Foobar.jpg|frameless|442x50px|border|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frameless",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "442x50px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "border",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - simple image with a formatted caption",
		"wikitext": "[[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "a",
				"name": "mw-link-ground string"
			},
			{
				"text": "</",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "b",
				"name": "mw-link-ground string"
			},
			{
				"text": "</",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "c",
				"name": "mw-link-ground string"
			},
			{
				"text": "</",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "tr",
				"name": "mw-link-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "table",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - caption with a template in it",
		"wikitext": "[[File:Foobar.jpg|thumb|200x23px|This caption has a {{1x|transclusion}} in it.]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "200x23px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "This caption has a ",
				"name": "mw-link-ground string"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "transclusion",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": " in it.",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - caption with unbalanced tags in it",
		"wikitext": "foo\n[[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]\nbar",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "200x200px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "This caption has a ",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "center",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "unbalanced tag in it.",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - empty caption (1)",
		"wikitext": "[[File:Foobar.jpg|thumb|]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - empty caption (2)",
		"wikitext": "[[File:Foobar.jpg|thumb]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - whitespace caption",
		"wikitext": "[[File:Foobar.jpg|thumb| ]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "| ",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid-specific image handling - lang option",
		"wikitext": "foo\n[[File:Foobar.svg|lang=de|caption]]\nbar",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.svg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "lang=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "de",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "File containing double quotes and spaces",
		"wikitext": "[[File:Cool \"Gator\".png]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Cool \"Gator\".png",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "File containing single quotes",
		"wikitext": "[[File:Foo's ''italic'' bar.jpg]]\n[[File:Foo's ''italic'' bar.jpg|Foo's ''italic'' bar]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foo's ''italic'' bar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foo's ''italic'' bar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Foo's ",
				"name": "mw-link-ground string"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "italic",
				"name": "mw-link-ground string mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": " bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Broken image links with HTML captions (T41700)",
		"wikitext": "[[File:Nonexistent|<script></script>]]\n[[File:Nonexistent|100x100px|<script></script>]]\n[[File:Nonexistent|&lt;]]\n[[File:Nonexistent|a<i>b</i>c]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Nonexistent",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<script></script>",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Nonexistent",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "100x100px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<script></script>",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Nonexistent",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "&lt;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Nonexistent",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "a",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "i",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "b",
				"name": "mw-link-ground string"
			},
			{
				"text": "</",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "i",
				"name": "mw-link-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-link-ground angleBracket"
			},
			{
				"text": "c",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Broken image links with empty alt",
		"wikitext": "[[File:Nonexistent|alt=|foo]]\n[[File:Nonexistent|alt=  <!--x-->  |foo]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Nonexistent",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Nonexistent",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "  ",
				"name": "mw-link-ground string"
			},
			{
				"text": "<!--x-->",
				"name": "mw-link-ground comment"
			},
			{
				"text": "  ",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Media in wikilink",
		"wikitext": "[[Test|[[File:Foobar.jpg]]]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Test",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Template with thumb image (with link in description)",
		"wikitext": "{{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "paramtest",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "param=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Image:noimage.png",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground operator"
			},
			{
				"text": "thumb|",
				"name": "mw-template-link-ground string"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "no link",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground operator"
			},
			{
				"text": "link",
				"name": "mw-template-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": " ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "no link",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-template-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "]]",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T3219 URL next to image (good)",
		"wikitext": "http://example.com [[File:Foobar.jpg]]",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T3219 URL next to image (broken)",
		"wikitext": "http://example.com[[File:Foobar.jpg]]",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image link to nonexistent file (T3850 - good)",
		"wikitext": "[[File:No_such.jpg]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:No_such.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": ":Image link to nonexistent file (T3850 - bad)",
		"wikitext": "[[:Image:No such.jpg]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Image:No such.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Fuzz testing: image with bogus manual thumbnail",
		"wikitext": "[[Image:foobar.jpg|thumbnail= ]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumbnail= ",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Gallery with valid attributes",
		"wikitext": "<gallery type=\"123\" summary=\"345\" class=\"foo\">\nFile:File:Foobar.jpg\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "type=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"123\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " summary=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"345\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " class=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery",
		"wikitext": "<gallery>\nimage1.png |\nimage2.gif|||||\n\nimage3|\nimage4    |300px| centre\n image5.svg| http://///////\n[[x|xx]]]]\n* image6\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "image1.png",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": " |",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "image2.gif",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|||||",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "image3",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "image4",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "    |",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "300px",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "| ",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "centre",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": " image5.svg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "| ",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "http://///////",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "[[x",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "xx]]]]",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "* image6",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery with line not in the file namespace",
		"wikitext": "<gallery>\n:'''''Albert Willimsky''' ''Geboren am 28.2.1890''\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": ":'''''Albert Willimsky''' ''Geboren am 28.2.1890''",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery (with options, html)",
		"wikitext": "<gallery widths=\"70px\" heights=\"40px\" perrow=\"2\" caption=\"Foo [[Main Page]]\">\nFile:Nonexistent.jpg|caption\nFile:Nonexistent.jpg\nimage:foobar.jpg|some '''caption''' [[Main Page]]\nimage:foobar.jpg\nimage:foobar.jpg|alt=This is a foo-bar.|blabla.\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "widths=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"70px\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " heights=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"40px\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " perrow=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"2\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " caption=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"Foo [[Main Page]]\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Nonexistent.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "caption",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "File:Nonexistent.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "image:foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "some ",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "'''",
				"name": "mw-tag-gallery string character"
			},
			{
				"text": "caption",
				"name": "mw-tag-gallery string mw-strong"
			},
			{
				"text": "'''",
				"name": "mw-tag-gallery string character"
			},
			{
				"text": " ",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "[[",
				"name": "mw-tag-gallery mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-tag-gallery mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-tag-gallery mw-link-ground squareBracket"
			},
			{
				"text": "image:foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "image:foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "This is a foo-bar.",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "blabla.",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery (without px units)",
		"wikitext": "<gallery widths=\"70\" heights=\"40\">\nFile:Foobar.jpg\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "widths=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"70\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " heights=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"40\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery (with invalid units)",
		"wikitext": "<gallery widths=\"70em\" heights=\"40em\">\nFile:Foobar.jpg\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "widths=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"70em\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " heights=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"40em\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery with link that has fragment",
		"wikitext": "<gallery>\nimage:foobar.jpg|link=Main_Page\nimage:foobar.jpg|link=Main_Page#section\nimage:foobar.jpg|link=Main Page#section|caption\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "image:foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "link=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "Main_Page",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "image:foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "link=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "Main_Page#section",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "image:foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "link=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "Main Page#section",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "caption",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery with template inside caption",
		"wikitext": "<gallery caption=\"{{1x|hi}}\">\nFile:Foobar.jpg|{{1x|ho}}\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "caption=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"{{1x|hi}}\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "{{",
				"name": "mw-tag-gallery mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-tag-gallery mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery mw-template-ground separator"
			},
			{
				"text": "ho",
				"name": "mw-tag-gallery mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-tag-gallery mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery with wikitext inside gallery caption",
		"wikitext": "<gallery caption=\"# This should not be a list item\n\nText '''bold''' [[link]] {{ns:-1}}\n\n[[File:Foobar.jpg|thumb|File in gallery caption]]\">\nFile:Foobar.jpg|Image caption\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "caption=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"# This should not be a list item",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": "Text '''bold''' [[link]] {{ns:-1}}",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": "[[File:Foobar.jpg|thumb|File in gallery caption]]\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "Image caption",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery with wikitext inside caption",
		"wikitext": "<gallery>\nFile:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]\nFile:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "galleryalt",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "[[",
				"name": "mw-tag-gallery mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-link-ground mw-image-parameter"
			},
			{
				"text": "inneralt",
				"name": "mw-tag-gallery mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery mw-link-ground operator"
			},
			{
				"text": "20x20px",
				"name": "mw-tag-gallery mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery mw-link-ground operator"
			},
			{
				"text": "desc",
				"name": "mw-tag-gallery mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-tag-gallery mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "galleryalt",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "{{",
				"name": "mw-tag-gallery mw-template-ground bracket"
			},
			{
				"text": "Test",
				"name": "mw-tag-gallery mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery mw-template-ground separator"
			},
			{
				"text": "unamedParam",
				"name": "mw-tag-gallery mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery mw-template-ground separator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-template-ground definitionKeyword"
			},
			{
				"text": "param",
				"name": "mw-tag-gallery mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-tag-gallery mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery with wikitext incl bogus HTML tag (T237318)",
		"wikitext": "<gallery>\nFile:Foobar.jpg|</ref>\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "</ref",
				"name": "mw-tag-gallery mw-error"
			},
			{
				"text": ">",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery (with showfilename option)",
		"wikitext": "<gallery showfilename=\"\">\nFile:Nonexistent.jpg|caption\nFile:Nonexistent.jpg\nFile:Foobar.jpg|some '''caption''' [[Main Page]]\nFile:Foobar.jpg\nFile:Redirect to foobar.jpg\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "showfilename=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Nonexistent.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "caption",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "File:Nonexistent.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "some ",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "'''",
				"name": "mw-tag-gallery string character"
			},
			{
				"text": "caption",
				"name": "mw-tag-gallery string mw-strong"
			},
			{
				"text": "'''",
				"name": "mw-tag-gallery string character"
			},
			{
				"text": " ",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "[[",
				"name": "mw-tag-gallery mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-tag-gallery mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-tag-gallery mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "File:Redirect to foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery (with namespace-less filenames)",
		"wikitext": "<gallery>\nFile:Nonexistent.jpg\nNonexistent.jpg\nimage:foobar.jpg\nfoobar.jpg\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Nonexistent.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "Nonexistent.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "image:foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery override link with wikilink (T36852)",
		"wikitext": "<gallery>\nFile:Foobar.jpg|link=Wikilink|alt=galleryalt\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "link=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "Wikilink",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "galleryalt",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery override link with absolute external link (T36852)",
		"wikitext": "<gallery>\nFile:Foobar.jpg|alt=galleryalt|link=http://www.example.org\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "galleryalt",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "link=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "http://www.example.org",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery override link with absolute external link with LanguageConverter",
		"wikitext": "<gallery>\nFile:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "caption",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "galleryalt",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "link=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "http://www.example.org",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery override link with malicious javascript (T36852)",
		"wikitext": "<gallery>\nFile:Foobar.jpg|alt=galleryalt|link=\" onclick=\"alert('malicious javascript code!');\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "galleryalt",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "link=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "\" onclick=\"alert('malicious javascript code!');",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery with invalid title as link (T45964)",
		"wikitext": "<gallery>\nFile:Foobar.jpg|link=<\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "link=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "<",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Serialize gallery without attrs in data-mw",
		"wikitext": "<gallery caption=\"123\">\nFile:Test.png\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "caption=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"123\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Test.png",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery with class and style attributes",
		"wikitext": "<gallery class=\"center\" style=\"text-align: center;\">\nFile:Foobar.jpg\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "class=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"center\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " style=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"text-align: center;\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery in nolines mode",
		"wikitext": "<gallery mode=\"nolines\" showfilenames=\"yes\" caption=\"No Lines!\">\nFile:Foobar.jpg|foo\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "mode=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"nolines\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " showfilenames=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"yes\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " caption=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"No Lines!\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "foo",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery in slideshow mode",
		"wikitext": "<gallery mode=\"slideshow\" showthumbnails=\"\">\nFile:Foobar.jpg\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "mode=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"slideshow\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " showthumbnails=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery in packed mode",
		"wikitext": "<gallery mode=\"packed\">\nFile:Foobar.jpg\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "mode=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"packed\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery in packed mode with heights",
		"wikitext": "<gallery mode=\"packed\" heights=\"70\">\nFile:Foobar.jpg\nFile:Tall.jpg\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "mode=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"packed\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " heights=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"70\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "File:Tall.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery in packed-overlay mode",
		"wikitext": "<gallery mode=\"packed-overlay\" showfilenames=\"yes\" caption=\"Packed Overlay!\">\nFile:Foobar.jpg|foo\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "mode=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"packed-overlay\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " showfilenames=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"yes\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " caption=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"Packed Overlay!\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "foo",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery in packed-hover mode",
		"wikitext": "<gallery mode=\"packed-hover\" showfilenames=\"yes\" caption=\"Packed Hover!\">\nFile:Foobar.jpg|foo\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "mode=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"packed-hover\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " showfilenames=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"yes\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " caption=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"Packed Hover!\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "foo",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Serialize gallery image captions on a line",
		"wikitext": "<gallery>\nFile:Foobar.jpg| hi  ho \nFile:Foobar.jpg|hi<br />ho\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "| ",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "hi  ho ",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "hi",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "<",
				"name": "mw-tag-gallery angleBracket"
			},
			{
				"text": "br ",
				"name": "mw-tag-gallery tagName"
			},
			{
				"text": "/>",
				"name": "mw-tag-gallery angleBracket"
			},
			{
				"text": "ho",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Centre-aligned image",
		"wikitext": "[[Image:foobar.jpg|centre]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "centre",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "None-aligned image",
		"wikitext": "[[Image:foobar.jpg|none]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "none",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Width + Height sized image (using px) (height is ignored)",
		"wikitext": "[[Image:foobar.jpg|640x480px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "640x480px",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Width-sized image (using px, no following whitespace)",
		"wikitext": "[[Image:foobar.jpg|640px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "640px",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Width-sized image (using px, with following whitespace - test regression from r39467)",
		"wikitext": "[[Image:foobar.jpg|640px ]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "640px ",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Width-sized image (using px, with preceding whitespace - test regression from r39467)",
		"wikitext": "[[Image:foobar.jpg| 640px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "| ",
				"name": "mw-link-ground operator"
			},
			{
				"text": "640px",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with page parameter",
		"wikitext": "[[File:LoremIpsum.djvu]]\n\n[[File:LoremIpsum.djvu|page=2]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:LoremIpsum.djvu",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:LoremIpsum.djvu",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "page=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "2",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with page parameter and link",
		"wikitext": "[[File:LoremIpsum.djvu|link=https://google.com|page=2]]\n[[File:LoremIpsum.djvu|link=https://google.com?page=4|page=2]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:LoremIpsum.djvu",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "https://google.com",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "page=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "2",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:LoremIpsum.djvu",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "https://google.com?page=4",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "page=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "2",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with page parameter and manualthumb",
		"wikitext": "[[File:LoremIpsum.djvu|thumbnail=Thumb.png|page=2]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:LoremIpsum.djvu",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumbnail=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Thumb.png",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "page=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "2",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with page parameter generated by a template",
		"wikitext": "[[File:LoremIpsum.djvu|page={{1x|2}}]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:LoremIpsum.djvu",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "page=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "2",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with modified page parameter; serialize data-mw not href query",
		"wikitext": "[[File:LoremIpsum.djvu|page 2]]\n\n[[File:LoremIpsum.djvu|page {{1x|2}}]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:LoremIpsum.djvu",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "page ",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "2",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:LoremIpsum.djvu",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "page ",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "2",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with modified page parameter; serialize data-mw not href query (2)",
		"wikitext": "[[File:LoremIpsum.djvu|page 2]]\n\n[[File:LoremIpsum.djvu|page {{1x|2}}]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:LoremIpsum.djvu",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "page ",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "2",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:LoremIpsum.djvu",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "page ",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "2",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Images with the \"|\" character in the comment",
		"wikitext": "[[File:Foobar.jpg|thumb|An [http://test/?param1=|left|&param2=|x external] URL]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "An ",
				"name": "mw-link-ground string"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "test/?param1=|left|&param2=|x",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "external",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": " URL",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "T146305: Don't break image parsing if nested language converter markup is in the caption.",
		"wikitext": "[[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "-{",
				"name": "mw-link-ground mw-conversion-bracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground mw-conversion-delimiter"
			},
			{
				"text": "zh-cn:blog (hk: ",
				"name": "mw-link-ground string"
			},
			{
				"text": "-{",
				"name": "mw-link-ground mw-conversion-bracket"
			},
			{
				"text": "zh-hans",
				"name": "mw-link-ground mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-link-ground mw-conversion-delimiter"
			},
			{
				"text": "WEBJOURNAL",
				"name": "mw-link-ground string"
			},
			{
				"text": "}-",
				"name": "mw-link-ground mw-conversion-bracket"
			},
			{
				"text": ", tw: ",
				"name": "mw-link-ground string"
			},
			{
				"text": "-{",
				"name": "mw-link-ground mw-conversion-bracket"
			},
			{
				"text": "zh-hans",
				"name": "mw-link-ground mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-link-ground mw-conversion-delimiter"
			},
			{
				"text": "WEBLOG",
				"name": "mw-link-ground string"
			},
			{
				"text": "}-",
				"name": "mw-link-ground mw-conversion-bracket"
			},
			{
				"text": ")",
				"name": "mw-link-ground string"
			},
			{
				"text": "}-",
				"name": "mw-link-ground mw-conversion-bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Don't break gallery if language converter markup is inside.",
		"wikitext": "<gallery>\nFile:Foobar.jpg|alt=-{R|bat}-|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]\nFile:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=-{R|param}-}}\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "-{",
				"name": "mw-tag-gallery mw-conversion-bracket"
			},
			{
				"text": "R",
				"name": "mw-tag-gallery mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery mw-conversion-delimiter"
			},
			{
				"text": "bat",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "}-",
				"name": "mw-tag-gallery mw-conversion-bracket"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "[[",
				"name": "mw-tag-gallery mw-link-ground squareBracket"
			},
			{
				"text": "File:foobar.jpg",
				"name": "mw-tag-gallery mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery mw-link-ground operator"
			},
			{
				"text": "20px",
				"name": "mw-tag-gallery mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery mw-link-ground operator"
			},
			{
				"text": "desc",
				"name": "mw-tag-gallery mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-link-ground mw-image-parameter"
			},
			{
				"text": "-{",
				"name": "mw-tag-gallery mw-link-ground mw-conversion-bracket"
			},
			{
				"text": "R",
				"name": "mw-tag-gallery mw-link-ground mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery mw-link-ground mw-conversion-delimiter"
			},
			{
				"text": "foo",
				"name": "mw-tag-gallery mw-link-ground string"
			},
			{
				"text": "}-",
				"name": "mw-tag-gallery mw-link-ground mw-conversion-bracket"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery mw-link-ground operator"
			},
			{
				"text": "-{",
				"name": "mw-tag-gallery mw-link-ground mw-conversion-bracket"
			},
			{
				"text": "R",
				"name": "mw-tag-gallery mw-link-ground mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery mw-link-ground mw-conversion-delimiter"
			},
			{
				"text": "bar",
				"name": "mw-tag-gallery mw-link-ground string"
			},
			{
				"text": "}-",
				"name": "mw-tag-gallery mw-link-ground mw-conversion-bracket"
			},
			{
				"text": "]]",
				"name": "mw-tag-gallery mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "galleryalt",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "{{",
				"name": "mw-tag-gallery mw-template-ground bracket"
			},
			{
				"text": "Test",
				"name": "mw-tag-gallery mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery mw-template-ground separator"
			},
			{
				"text": "unamedParam",
				"name": "mw-tag-gallery mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery mw-template-ground separator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-template-ground definitionKeyword"
			},
			{
				"text": "-{",
				"name": "mw-tag-gallery mw-template-ground mw-conversion-bracket"
			},
			{
				"text": "R",
				"name": "mw-tag-gallery mw-template-ground mw-conversion-flag"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery mw-template-ground mw-conversion-delimiter"
			},
			{
				"text": "param",
				"name": "mw-tag-gallery mw-template-ground attributeValue"
			},
			{
				"text": "}-",
				"name": "mw-tag-gallery mw-template-ground mw-conversion-bracket"
			},
			{
				"text": "}}",
				"name": "mw-tag-gallery mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Free external link invading image caption",
		"wikitext": "[[File:Foobar.jpg|thumb|http://x|hello]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "http://x",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "hello",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Special characters in embedded file links (T29679)",
		"wikitext": "[[File:Contains & ampersand.jpg]]\n[[File:Does not exist.jpg|Title with & ampersand]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Contains & ampersand.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Does not exist.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Title with & ampersand",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "1. Treebuilder fixup of formatting elt",
		"wikitext": "{|\n|\n<small>\n[[Image:Foobar.jpg|right|Test]]\n</small>\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right|Test",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "2. Treebuilder fixup of formatting elt",
		"wikitext": "'''foo[[File:Foobar.jpg|thumb|caption]]bar'''\n\n<small>[[Image:Foobar.jpg|right|300px]]</small>",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-strong"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string mw-strong"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "bar",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right|300px",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "3. Treebuilder fixup of formatting elt",
		"wikitext": "<small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-strong"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string mw-strong"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "bar",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "4. Treebuilder fixup of formatting elt: formatting tags around captionless images",
		"wikitext": "'''<small>[[Image:Foobar.jpg|right|300px]]</small>'''",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-strong"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right|300px",
				"name": "mw-link-ground string mw-strong"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Image: Modifying size of an image (1)",
		"wikitext": "[[Image:Foobar.jpg|230x230px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "230x230px",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: Modifying size of an image (2)",
		"wikitext": "[[Image:Foobar.jpg|230x230px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "230x230px",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: Modifying size of an image (3)",
		"wikitext": "[[Image:Foobar.jpg|thumb]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: Modifying alignment of an image (T50665)",
		"wikitext": "[[Image:Foobar.jpg|thumb|caption|right]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb|caption|right",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: Modifying mw-default-size of an frameless image (T64805)",
		"wikitext": "[[Image:Foobar.jpg|frameless|right]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frameless|right",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: Modifying valign of an image (T51221)",
		"wikitext": "[[File:Foobar.jpg|20px|middle]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "20px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "middle",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: Modifying alt attribute of an image (T58400)",
		"wikitext": "[[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "some caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "some alternate text",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: Modifying caption of an image",
		"wikitext": "[[Image:Foobar.jpg|thumb|original caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb|original caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: empty alt attribute (T50924)",
		"wikitext": "[[File:Foobar.jpg|alt=|thumb|bar]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: Block level image should have \\n before and after",
		"wikitext": "123\n[[File:Foobar.jpg|right|thumb|150x150px]]\n456",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "150x150px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: New block level image should have \\n before and after (existing content)",
		"wikitext": "123\n[[File:Foobar.jpg|right|thumb|150x150px]]\n456",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "right",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "150x150px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: upright option (parsoid)",
		"wikitext": "[[File:Foobar.jpg|thumb|upright|caption]]\n[[File:Foobar.jpg|thumb|upright=0.5|caption]]\n[[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "upright",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "upright=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "0.5",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "500x500px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "upright=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "0.5",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: upright option is ignored on inline and frame images (parsoid)",
		"wikitext": "[[File:Foobar.jpg|500x500px|upright=0.5|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "500x500px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "upright=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "0.5",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: in template parameter with empty parameter",
		"wikitext": "{{1x|[[File:Foobar.jpg|link=]]}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-template-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Image: from basic HTML (1)",
		"wikitext": "[[File:Foobar.jpg|link=|alt=Alt|100x100px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Alt",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "100x100px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: from basic HTML (2)",
		"wikitext": "[[File:Foobar.jpg|link=|alt=Alt|100x100px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Alt",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "100x100px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: from basic HTML (3)",
		"wikitext": "[[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Main",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Alt",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "100x100px",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: from basic HTML (4)",
		"wikitext": "[[File:Foobar.jpg|link=]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image: Invalid title as link",
		"wikitext": "[[File:Foobar.jpg|link=<]]\n[[File:Foobar.jpg|link=<|thumb]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "<",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "<",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Image with page parameter and invalid link",
		"wikitext": "[[File:LoremIpsum.djvu|link=<|page=2]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:LoremIpsum.djvu",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "<",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "page=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "2",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Percent decode titles in the link option (T216003#7836261)",
		"wikitext": "[[Test%22123]]\n[[File:Foobar.jpg|link=Test%22123]]\n[[File:Foobar.jpg|link=[[Test%22123]]]]\n\n<gallery>\nFile:Foobar.jpg|link=Test%22123\nFile:Foobar.jpg|link=[[Test%22123]]\n</gallery>",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Test%22123",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Test%22123",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Test%22123",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "link=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "Test%22123",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "link=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "[[",
				"name": "mw-tag-gallery mw-link-ground squareBracket"
			},
			{
				"text": "Test%22123",
				"name": "mw-tag-gallery mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-tag-gallery mw-link-ground squareBracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Should not double decode the link option",
		"wikitext": "[[Test%2522]]\n[[File:Foobar.jpg|link=Test%2522]]\n[[File:Foobar.jpg|link=[[Test%2522]]]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Test%2522",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Test%2522",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Test%2522",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Various link types in alt and link options",
		"wikitext": "[[File:Foobar.jpg|link=[[Main Page]]|alt=[[Main Page]]|caption]]\n\n[[File:Foobar.jpg|link=[[Media:Thumb.png]]|alt=[[Media:Thumb.png]]|caption]]\n\n[[File:Foobar.jpg|link=[[wikipedia:Foo]]|alt=[[wikipedia:Foo]]|caption]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Media:Thumb.png",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Media:Thumb.png",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "wikipedia:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "wikipedia:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Magic links inside image captions (autolinked)",
		"wikitext": "[[File:Foobar.jpg|thumb|http://example.com]]\n[[File:Foobar.jpg|thumb|RFC 1234]]\n[[File:Foobar.jpg|thumb|PMID 1234]]\n[[File:Foobar.jpg|thumb|ISBN 123456789x]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "http://example.com",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "RFC 1234",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "PMID 1234",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "ISBN 123456789x",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "File in link scenarios",
		"wikitext": "[http://www.google.com [[File:Foobar.jpg|123]]]\n\n[http://www.google.com [[File:Foobar.jpg|thumb|123]]]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.google.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "[[File:Foobar.jpg|123",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "www.google.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "[[File:Foobar.jpg|thumb|123",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Thumbnail output",
		"wikitext": "[[File:Thumb.png|thumb]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Thumb.png",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "File with caption with pipe in extension tag attribute",
		"wikitext": "[[File:Foobar.jpg|thumb|Test <nowiki bogus=\"attri|bute\"/> 123]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Test ",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki ",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "bogus=",
				"name": "mw-link-ground mw-exttag-attribute mw-ext-nowiki"
			},
			{
				"text": "\"attri|bute\"",
				"name": "mw-link-ground mw-exttag-attribute-value"
			},
			{
				"text": "/>",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": " 123",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "File with table in caption with extra table attribute spaces",
		"wikitext": "[[File:Foobar.jpg|thumb|\n{|\n|-  \n|hi\n|}\n]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-  ",
				"name": "mw-link-ground typeOperator"
			},
			{
				"text": "|",
				"name": "mw-link-ground typeOperator"
			},
			{
				"text": "hi",
				"name": "mw-link-ground"
			},
			{
				"text": "|}",
				"name": "mw-link-ground null"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "File in formatting element violating content model",
		"wikitext": "<p>''[[File:Foobar.jpg|thumb]]''</p>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-em"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "File in formatting element violating content model, multiple open",
		"wikitext": "<p>'''''[[File:Foobar.jpg|thumb]]'''''</p>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-strong mw-em"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "File in formatting element violating content model, figcaption content",
		"wikitext": "<p>''test [[File:Foobar.jpg|thumb|123]] 456''</p>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "test ",
				"name": "mw-em"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-em"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "123",
				"name": "mw-link-ground string mw-em"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": " 456",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Table in figcaption nested in table",
		"wikitext": "{|\n|foo\n|[[File:Foobar.jpg|thumb|\n{|\n|bar\n|}\n]]\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "mw-link-ground typeOperator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground"
			},
			{
				"text": "|}",
				"name": "mw-link-ground null"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Files with case sensitive media options",
		"wikitext": "[[File:Foobar.jpg|thumb|left]]\n[[File:Foobar.jpg|thumb|Left]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "left",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Left",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Exercise selser on native galleries",
		"wikitext": "<gallery>\nFile:Foobar.jpg|alt=123|123\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "alt=",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "123",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "123",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Selser preserves spacing in gallery when only caption is edited",
		"wikitext": "<gallery caption=\"123\">\nFile:Foobar.jpg\n\nFile:Foobar.jpg\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "caption=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"123\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Selser preserves unedited gallery lines",
		"wikitext": "<gallery>\nFile:Foobar.jpg|123\nFile:Foobar.jpg|thumb|haha\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "123",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "thumb",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "haha",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Format option in gallery - T214601",
		"wikitext": "<gallery>\nFile:Foobar.jpg|thumb|123\nFile:Doesnotexist.jpg|thumb|456 - has an error noted in the rdfa\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "thumb",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "123",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "File:Doesnotexist.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "thumb",
				"name": "mw-tag-gallery mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "456 - has an error noted in the rdfa",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Broken inline media with a caption and an alt",
		"wikitext": "[[File:Broken.jpg|alt=An alternative text description.|A caption for the media.]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Broken.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "An alternative text description.",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "A caption for the media.",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Broken block media with a caption and an alt",
		"wikitext": "[[File:Broken.jpg|alt=An alternative text description.|thumb|A caption for the media.]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Broken.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "alt=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "An alternative text description.",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "A caption for the media.",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Broken inline media with a caption",
		"wikitext": "[[File:Broken.jpg|A caption for the media.]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Broken.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "A caption for the media.",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Broken block media with a caption",
		"wikitext": "[[File:Broken.jpg|thumb|A caption for the media.]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Broken.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "A caption for the media.",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Gallery line without file namespace",
		"wikitext": "<gallery>\nFoobar.jpg\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Lines added to a self-closed gallery should not be dropped",
		"wikitext": "<gallery caption=\"123\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "caption=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"123\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Broken media with frame and frameless formats",
		"wikitext": "[[File:Barfoo.jpg|frame|123]]\n[[File:Barfoo.jpg|frameless|123]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Barfoo.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frame",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "123",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Barfoo.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "frameless",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "123",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Media with broken manualthumb",
		"wikitext": "[[File:Foobar.jpg|thumbnail=Barfoo.jpg|123]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumbnail=",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "Barfoo.jpg",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "123",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Media with caption that would stringify to a valid media option",
		"wikitext": "[[File:Foobar.jpg|'''thumb''']]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "'''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground string mw-strong"
			},
			{
				"text": "'''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Collect media metadata",
		"wikitext": "[[File:Foobar.jpg|123]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "123",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Fragment in media filename",
		"wikitext": "[[File:Foobar.jpg#fragment|123]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "fragment",
				"name": "mw-link-ground className"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "123",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Entities in media filenames",
		"wikitext": "[[File:Hi&#45;ho.jpg|thumb]]\n\n<gallery>\nHi&#45;ho.jpg\nFile:Hi&#45;ho.jpg\n</gallery>",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Hi",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "&#45;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "ho.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "Hi",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "&#45;",
				"name": "mw-tag-gallery mw-html-entity"
			},
			{
				"text": "ho.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "File:Hi",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "&#45;",
				"name": "mw-tag-gallery mw-html-entity"
			},
			{
				"text": "ho.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Filename with amp symbol in gallery",
		"wikitext": "<gallery>\nFile:file & file.jpg\nFile:file &amp; file.jpg\nFile:file %26 file.jpg\nfile & file.jpg\nfile &amp; file.jpg\nfile %26 file.jpg\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:file & file.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "File:file ",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "&amp;",
				"name": "mw-tag-gallery mw-html-entity"
			},
			{
				"text": " file.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "File:file %26 file.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "file & file.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "file ",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "&amp;",
				"name": "mw-tag-gallery mw-html-entity"
			},
			{
				"text": " file.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "file %26 file.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Inline gallery attributes are appended to the defaults",
		"wikitext": "<gallery perrow=\"1\" style=\"color: red\">\nFile:Foobar.jpg|One\nFile:Foobar.jpg|Two\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery ",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": "perrow=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " style=",
				"name": "mw-exttag-attribute mw-ext-gallery"
			},
			{
				"text": "\"color: red\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "One",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "Two",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Gallery line with trailing closing square brackets",
		"wikitext": "<gallery>\nFile:Foobar.jpg|Testing 123]]\nFile:Foobar.jpg|Testing [[123]]\n</gallery>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "Testing 123]]",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-tag-gallery mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-tag-gallery operator"
			},
			{
				"text": "Testing ",
				"name": "mw-tag-gallery string"
			},
			{
				"text": "[[",
				"name": "mw-tag-gallery mw-link-ground squareBracket"
			},
			{
				"text": "123",
				"name": "mw-tag-gallery mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-tag-gallery mw-link-ground squareBracket"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-gallery"
			},
			{
				"text": "gallery",
				"name": "mw-exttag-name mw-ext-gallery"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-gallery"
			}
		]
	},
	{
		"desc": "Broken media gets category",
		"wikitext": "[[File:Foobaz.jpg]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobaz.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Vertical alignment classes",
		"wikitext": "[[File:Foobar.jpg|baseline]]\n[[File:Foobar.jpg|sub]]\n[[File:Foobar.jpg|super]]\n[[File:Foobar.jpg|top]]\n[[File:Foobar.jpg|text-top]]\n[[File:Foobar.jpg|middle]]\n[[File:Foobar.jpg|bottom]]\n[[File:Foobar.jpg|text-bottom]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "baseline",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "sub",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "super",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "top",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "text-top",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "middle",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bottom",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "text-bottom",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "File in table pipe precedence",
		"wikitext": "{|\n|[[File:Foobar.jpg|test\n|left]]\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "test",
				"name": "mw-link-ground string"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "left",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "T374445: Non extlink in media caption",
		"wikitext": "[[File:Foobar.jpg|thumb|[<nowiki/>[[Link1]]<nowiki>]</nowiki>]]\n[[File:Foobar.jpg|thumb|[[Link1|[<nowiki/>Link1<nowiki>]</nowiki>]]]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Link1",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Link1",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "Link1",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]]]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "No block tags",
		"wikitext": "a\n\nb",
		"nodes": []
	},
	{
		"desc": "Block tag on one line (<div>)",
		"wikitext": "a <div>foo</div>\n\nb",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "No p-wrappable content",
		"wikitext": "<span><div>x</div></span>\n<span><s><div>x</div></s></span>\n<small><em></em></small><span><s><div>x</div></s></span>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "em",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "em",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "small",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code",
		"wikitext": "{{1x|<span><div>x</div></span>}}\nx",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "><",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "x",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "></",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Block tag on one line (<blockquote>)",
		"wikitext": "a <blockquote>foo</blockquote>\n\nb",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Block tag on both lines (<div>)",
		"wikitext": "a <div>foo</div>\n\nb <div>foo</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Block tag on both lines (<blockquote>)",
		"wikitext": "a <blockquote>foo</blockquote>\n\nb <blockquote>foo</blockquote>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Multiple lines without block tags",
		"wikitext": "<div>foo</div> a\nb\nc\nd<!--foo--> e\nx <div>foo</div> z",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<!--foo-->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Empty lines between lines with block tags",
		"wikitext": "<div></div>\n\n\n<div></div>a\n\nb\n<div>a</div>b\n\n<div>b</div>d\n\n\n<div>e</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Unclosed HTML p-tags should be handled properly",
		"wikitext": "<div><p>foo</div>\na\n\nb",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</div>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "1. P-wrapping should leave sol-transparent tags outside p-tags where possible",
		"wikitext": "a [[Category:A1]] [[Category:A2]]\n[[Category:A3]]\n[[Category:A4]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:A1",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:A2",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:A3",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:A4",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "2. P-wrapping should leave sol-transparent tags outside p-tags where possible",
		"wikitext": "[[Category:A1]]a",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:A1",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "No paragraph necessary for SOL transparent template",
		"wikitext": "<span><div>foo</div></span>\n[[Category:Foo]]\n\n<span><div>foo</div></span>\n{{1x|[[Category:Foo]]}}",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Avoid expanding multiline sol transparent template ranges unnecessarily",
		"wikitext": "hi\n\n\n{{1x|<br/>\n}}\n\n[[Category:Ho]]",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "br",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "/>",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Ho",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Paragraph wrapping following unclosed table",
		"wikitext": "{|\n|-\n\n{|\n| x\n|}\n\na\n\nb\n\nc",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Paragraph wrapping suppressed in html p",
		"wikitext": "<p>\n\n\nhi\n\n\n\n</p>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Dangling table row doesn't prevent p-wrapping",
		"wikitext": "{|\n| hi\n|-\n|} ho",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Paragraph wrapping suppressed in table captions",
		"wikitext": "{|\n|+hi\n|ho\n|}\n\n{|\n|hi\n|+ho\n|}\n\nit's off to work we go",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|+",
				"name": "typeOperator"
			},
			{
				"text": "hi",
				"name": "mw-table-caption"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|+",
				"name": "typeOperator"
			},
			{
				"text": "ho",
				"name": "mw-table-caption"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Extlink on a line with a block gets wrapped",
		"wikitext": "[https://google.com {{1x|foo}}] bar <div>foo</div>",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "https://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "google.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T240248: Erroring parser function shouldn't break references",
		"wikitext": "<ref>something</ref>\n{{#ifeq: {{#expr: string < 5 }} | 1 | true | false or error }}\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "something",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#ifeq",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "#expr",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": " string < 5 ",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": " ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " 1 ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " true ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " false or error ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Basic usage of {{=}}",
		"wikitext": "This uses {{=}}.",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "=",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Using {{Template:=}} doesn't invoke the parser function",
		"wikitext": "This uses {{Template:=}}.",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Template:=",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "<poem>",
		"wikitext": "<poem>\nthis\nis\na\ntest\n</poem>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "this",
				"name": "mw-exttag"
			},
			{
				"text": "is",
				"name": "mw-exttag"
			},
			{
				"text": "a",
				"name": "mw-exttag"
			},
			{
				"text": "test",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			}
		]
	},
	{
		"desc": "<poem> with recursive parsing",
		"wikitext": "<poem>\nthis ''is'' a '''test'''\n</poem>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "this ''is'' a '''test'''",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			}
		]
	},
	{
		"desc": "<poem> with leading whitespace",
		"wikitext": "<poem>\n\n   test\n\n</poem>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "   test",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			}
		]
	},
	{
		"desc": "Horizontal rule",
		"wikitext": "<poem>\nsome\n-----\ntext\n</poem>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "some",
				"name": "mw-exttag"
			},
			{
				"text": "-----",
				"name": "mw-exttag"
			},
			{
				"text": "text",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			}
		]
	},
	{
		"desc": "nested <poem><nowiki>",
		"wikitext": "<poem><nowiki>\nthis\nis\na\ntest\n</nowiki></poem>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "<nowiki>",
				"name": "mw-exttag"
			},
			{
				"text": "this",
				"name": "mw-exttag"
			},
			{
				"text": "is",
				"name": "mw-exttag"
			},
			{
				"text": "a",
				"name": "mw-exttag"
			},
			{
				"text": "test",
				"name": "mw-exttag"
			},
			{
				"text": "</nowiki>",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			}
		]
	},
	{
		"desc": "nested <poem><nowiki> with formatting",
		"wikitext": "<poem><nowiki>\nthis\n'''is'''\na\ntest\n</nowiki></poem>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "<nowiki>",
				"name": "mw-exttag"
			},
			{
				"text": "this",
				"name": "mw-exttag"
			},
			{
				"text": "'''is'''",
				"name": "mw-exttag"
			},
			{
				"text": "a",
				"name": "mw-exttag"
			},
			{
				"text": "test",
				"name": "mw-exttag"
			},
			{
				"text": "</nowiki>",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			}
		]
	},
	{
		"desc": "Basic <poem> usage with style",
		"wikitext": "<poem style=\"border: 2px solid #d6d2c5; background-color: #f9f4e6; padding: 1em;\">\nA stately pleasure-dome decree:\nWhere Alph, the sacred river, ran\nThrough caverns measureless to man\nDown to a sunless sea.\n</poem>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem ",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": "style=",
				"name": "mw-exttag-attribute mw-ext-poem"
			},
			{
				"text": "\"border: 2px solid #d6d2c5; background-color: #f9f4e6; padding: 1em;\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "A stately pleasure-dome decree:",
				"name": "mw-exttag"
			},
			{
				"text": "Where Alph, the sacred river, ran",
				"name": "mw-exttag"
			},
			{
				"text": "Through caverns measureless to man",
				"name": "mw-exttag"
			},
			{
				"text": "Down to a sunless sea.",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			}
		]
	},
	{
		"desc": "Verify Parsoid handles entities in nowikis in poem correctly",
		"wikitext": "<poem>\nL1\nL2\n<nowiki>\n<ref>Not a ref</ref>\nfoo &amp; bar\n[[Not a link]]\n</nowiki>\nL3\n</poem>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "L1",
				"name": "mw-exttag"
			},
			{
				"text": "L2",
				"name": "mw-exttag"
			},
			{
				"text": "<nowiki>",
				"name": "mw-exttag"
			},
			{
				"text": "<ref>Not a ref</ref>",
				"name": "mw-exttag"
			},
			{
				"text": "foo &amp; bar",
				"name": "mw-exttag"
			},
			{
				"text": "[[Not a link]]",
				"name": "mw-exttag"
			},
			{
				"text": "</nowiki>",
				"name": "mw-exttag"
			},
			{
				"text": "L3",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			}
		]
	},
	{
		"desc": "UTF-8 sequences in extension tags (T231945)",
		"wikitext": "<poem>\n{{1x|ၶိူဝ်းႁဝ်ၶိူဝ်းရႃႇၸႃႇ}}\n</poem>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "{{1x|ၶိူဝ်းႁဝ်ၶိူဝ်းရႃႇၸႃႇ}}",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			}
		]
	},
	{
		"desc": "Multi-line poems with indentation use spans and breaks correctly (T235709)",
		"wikitext": "<poem>\n''CONGREGATI''\n:'''EX TOTO ORBE'''\n::'''''MATHEMATICI'''''\n:<span>foo</span>\n</poem>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "''CONGREGATI''",
				"name": "mw-exttag"
			},
			{
				"text": ":'''EX TOTO ORBE'''",
				"name": "mw-exttag"
			},
			{
				"text": "::'''''MATHEMATICI'''''",
				"name": "mw-exttag"
			},
			{
				"text": ":<span>foo</span>",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			}
		]
	},
	{
		"desc": "Indention syntax with no content",
		"wikitext": "<poem>\n::\n</poem>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "::",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			}
		]
	},
	{
		"desc": "Poem with class",
		"wikitext": "<poem class=\"hiho\">\nhi ho\n</poem>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem ",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": "class=",
				"name": "mw-exttag-attribute mw-ext-poem"
			},
			{
				"text": "\"hiho\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "hi ho",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			}
		]
	},
	{
		"desc": "Poem with empty class",
		"wikitext": "<poem class=\"\">\nhi ho\n</poem>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem ",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": "class=",
				"name": "mw-exttag-attribute mw-ext-poem"
			},
			{
				"text": "\"\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "hi ho",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-poem"
			},
			{
				"text": "poem",
				"name": "mw-exttag-name mw-ext-poem"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-poem"
			}
		]
	},
	{
		"desc": "<pre> with attributes (T5202)",
		"wikitext": "<pre style=\"background: blue; color:white\">Bluescreen of WikiDeath</pre>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre ",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": "style=",
				"name": "mw-exttag-attribute mw-ext-pre"
			},
			{
				"text": "\"background: blue; color:white\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "Bluescreen of WikiDeath",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "<pre> with width attribute (T5202)",
		"wikitext": "<pre width=\"8\">Narrow screen goodies</pre>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre ",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": "width=",
				"name": "mw-exttag-attribute mw-ext-pre"
			},
			{
				"text": "\"8\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "Narrow screen goodies",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "<pre> with forbidden attribute (T5202)",
		"wikitext": "<pre width=\"8\" onmouseover=\"alert(document.cookie)\">Narrow screen goodies</pre>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre ",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": "width=",
				"name": "mw-exttag-attribute mw-ext-pre"
			},
			{
				"text": "\"8\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " onmouseover=",
				"name": "mw-exttag-attribute mw-ext-pre"
			},
			{
				"text": "\"alert(document.cookie)\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "Narrow screen goodies",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "Entities inside <pre>",
		"wikitext": "<pre>&lt;</pre>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "&lt;",
				"name": "mw-tag-pre mw-html-entity"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "<pre> with forbidden attribute values (T5202)",
		"wikitext": "<pre width=\"8\" style=\"border-width: expression(alert(document.cookie))\">Narrow screen goodies</pre>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre ",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": "width=",
				"name": "mw-exttag-attribute mw-ext-pre"
			},
			{
				"text": "\"8\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " style=",
				"name": "mw-exttag-attribute mw-ext-pre"
			},
			{
				"text": "\"border-width: expression(alert(document.cookie))\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "Narrow screen goodies",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "<nowiki> inside <pre> (T15238)",
		"wikitext": "<pre>\n<nowiki>\n</pre>\n<pre>\n<nowiki></nowiki>\n</pre>\n<pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "<nowiki>",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "<nowiki></nowiki>",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "<nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki>",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "<nowiki> inside of #tag:pre",
		"wikitext": "{{#tag:pre|Foo <nowiki>&rarr;bar</nowiki>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "pre",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Foo ",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "&rarr;",
				"name": "mw-ext-ground mw-tag-nowiki mw-html-entity"
			},
			{
				"text": "bar",
				"name": "mw-ext-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "<nowiki> and <pre> preference (first one wins)",
		"wikitext": "<pre>\n<nowiki>\n</pre>\n</nowiki>\n</pre>\n\n<nowiki>\n<pre>\n<nowiki>\n</pre>\n</nowiki>\n</pre>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "<nowiki>",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "</nowiki",
				"name": "mw-error"
			},
			{
				"text": "</pre",
				"name": "mw-error"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<pre>",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "<nowiki>",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</pre>",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "</pre",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "</pre> inside nowiki",
		"wikitext": "<nowiki></pre></nowiki>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "</pre>",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Empty pre; pre inside other HTML tags (T56946)",
		"wikitext": "a\n\n<div><pre>\nfoo\n</pre></div>\n<pre></pre>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "foo",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": "></",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "HTML pre followed by indent-pre",
		"wikitext": "<pre>foo</pre>\n bar",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "foo",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "Block tag pre",
		"wikitext": "<p><pre>foo</pre></p>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "foo",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "p",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Pres with newline attributes",
		"wikitext": "<pre class=\"one\ntwo\">hi</pre>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre ",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": "class=",
				"name": "mw-exttag-attribute mw-ext-pre"
			},
			{
				"text": "\"one",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": "two\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "hi",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "Things that look like <pre> tags aren't treated as such",
		"wikitext": "Barack Obama <President> of the United States\n<President></President>",
		"nodes": []
	},
	{
		"desc": "Handle broken pre-like tags (T66025)",
		"wikitext": "{{1x|<pre <pre>x</pre>}}\n\n<table><pre </table>",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre ",
				"name": "mw-template-ground mw-exttag-name mw-ext-pre"
			},
			{
				"text": "<pre",
				"name": "mw-template-ground mw-exttag-attribute mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "x",
				"name": "mw-template-ground mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-template-ground mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre ",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": "</table",
				"name": "mw-exttag-attribute mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "Less than in attribute position",
		"wikitext": "<pre <pre>123</pre>\n\n<div <div>123</div>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre ",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": "<pre",
				"name": "mw-exttag-attribute mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "123",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Parsoid: handle pre with space after attribute",
		"wikitext": "<pre style=\"width:50%;\" >{{1x|foo}}</pre>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre ",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": "style=",
				"name": "mw-exttag-attribute mw-ext-pre"
			},
			{
				"text": "\"width:50%;\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "{{1x|foo}}",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "Self-closed pre",
		"wikitext": "<pre />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre ",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "HTML-pre: 1. embedded newlines",
		"wikitext": "<pre>foo</pre>\n\n<pre>\nfoo\n</pre>\n\n<pre>\n\nfoo\n</pre>\n\n<pre>\n\n\nfoo\n</pre>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "foo",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "foo",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "foo",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "foo",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "HTML-pre: big spaces",
		"wikitext": "<pre>\n\n\n\n\nhaha\n\n\n\n\nhaha\n\n\n\n\n</pre>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "haha",
				"name": "mw-tag-pre"
			},
			{
				"text": "haha",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "HTML-pre: 2: indented text",
		"wikitext": "<pre>\n foo\n</pre>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": " foo",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "HTML-pre: 3: other wikitext",
		"wikitext": "<pre>\n* foo\n# bar\n= no-h =\n'' no-italic ''\n[[ NoLink ]]\n</pre>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "* foo",
				"name": "mw-tag-pre"
			},
			{
				"text": "# bar",
				"name": "mw-tag-pre"
			},
			{
				"text": "= no-h =",
				"name": "mw-tag-pre"
			},
			{
				"text": "'' no-italic ''",
				"name": "mw-tag-pre"
			},
			{
				"text": "[[ NoLink ]]",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			}
		]
	},
	{
		"desc": "Template pre: Simple",
		"wikitext": "<pre>123</pre>\n\n{{pre|123}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "123",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "pre",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "123",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template pre: Quotes",
		"wikitext": "<pre>'''123'''</pre>\n\n{{pre|'''123'''}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "'''123'''",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "pre",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "'''123'''",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template pre: Indent pre",
		"wikitext": "<pre>a\n test\nb</pre>\n\n{{pre|a\n test\nb}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "a",
				"name": "mw-tag-pre"
			},
			{
				"text": " test",
				"name": "mw-tag-pre"
			},
			{
				"text": "b",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "pre",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": " test",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template pre: Pwrap",
		"wikitext": "<pre>\nfoo\n\nbar\n</pre>\n\n{{pre|\nfoo\n\nbar\n}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "foo",
				"name": "mw-tag-pre"
			},
			{
				"text": "bar",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "pre",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template pre: List",
		"wikitext": "<pre>\n*list\n*item\n</pre>\n\n{{pre|\n*list\n*item\n}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "*list",
				"name": "mw-tag-pre"
			},
			{
				"text": "*item",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "pre",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "*list",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "*item",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template pre: Table",
		"wikitext": "<pre>\n{|\n|test\n|}\n</pre>\n\n{{pre|\n{{{!}}\n{{!}}test\n{{!}}}\n}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "{|",
				"name": "mw-tag-pre"
			},
			{
				"text": "|test",
				"name": "mw-tag-pre"
			},
			{
				"text": "|}",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "pre",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "test",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "}",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template pre: Link",
		"wikitext": "<pre>\n[[Test]]\n[https://google.com 123]\n</pre>\n\n{{pre|\n[[Test]]\n[https://google.com 123]\n}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "[[Test]]",
				"name": "mw-tag-pre"
			},
			{
				"text": "[https://google.com 123]",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "pre",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Test",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "[",
				"name": "mw-template-link-ground modifier"
			},
			{
				"text": "https://",
				"name": "mw-template-link-ground namespace"
			},
			{
				"text": "google.com",
				"name": "mw-template-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-template-link-ground"
			},
			{
				"text": "123",
				"name": "mw-template-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-template-link-ground modifier"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template pre: Heading",
		"wikitext": "<pre>new\n=== test ===\nline</pre>\n\n{{pre|1=new\n=== test ===\nline}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "new",
				"name": "mw-tag-pre"
			},
			{
				"text": "=== test ===",
				"name": "mw-tag-pre"
			},
			{
				"text": "line",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "pre",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "new",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "=== test ===",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "line",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template pre: Nested template",
		"wikitext": "{{nested template in pre}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "nested template in pre",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template pre: Nowiki",
		"wikitext": "<pre>\n<nowiki>test</nowiki>\n</pre>\n\n{{pre|\n<nowiki>test</nowiki>\n}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "<nowiki>test</nowiki>",
				"name": "mw-tag-pre"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "pre",
				"name": "mw-exttag-name mw-ext-pre"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-pre"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "pre",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "test",
				"name": "mw-template-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Preprocessor precedence 1: link is rightmost opening",
		"wikitext": "{{[[Foo|bar}}]]\n\nBut close-brace is not a valid character in a link title:\n{{[[Foo}}|bar]]\n\nHowever, we can still tell this was handled as a link in the preprocessor:\n{{1x|[[Foo}}|bar]]|bat}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "[[Foo",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "[[Foo",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Foo}}",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-template-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "bat",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Preprocessor precedence 2: template is rightmost opening",
		"wikitext": "-{{1x|foo}-}}-",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo}-",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Preprocessor precedence 3: language converter is rightmost opening",
		"wikitext": "{{1x|hi}}\n\n{{-{R|1x|hi}}}-\n\n[[-{R|raw]]}-",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "hi",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "-{R",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1x",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "hi",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "-{R",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "raw",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Preprocessor precedence 4: left-most angle bracket",
		"wikitext": "<!--{raw}-->",
		"nodes": [
			{
				"text": "<!--{raw}-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Preprocessor precedence 5: tplarg takes precedence over template",
		"wikitext": "{{Precedence5|Bullet}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Precedence5",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Bullet",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Preprocessor precedence 6: broken link is rightmost opening",
		"wikitext": "{{1x|[[Foo}}\n\n{{1x|[[Foo|bar|bat=baz}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Foo}}",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "[[",
				"name": "mw-template2-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-template2-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-template2-link-ground operator"
			},
			{
				"text": "bar|bat=baz}}",
				"name": "mw-template2-link-ground string"
			}
		]
	},
	{
		"desc": "Preprocessor precedence 7: broken template is rightmost opening",
		"wikitext": "[[Foo|{{1x|Bar]]\n\n[[Foo|{{1x|Bar]]-x}}-y]]-z\n\nCareful: linktrails can move the end of the wikilink:\n[[Foo|{{1x|y']]a}}l]]l",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "Bar]]",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground operator"
			},
			{
				"text": "{{",
				"name": "mw-template2-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-link-ground separator"
			},
			{
				"text": "Bar]]-x",
				"name": "mw-template2-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-link-ground bracket"
			},
			{
				"text": "-y",
				"name": "mw-template-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "-z",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "Careful: linktrails can move the end of the wikilink:",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "[[",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-template-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground operator"
			},
			{
				"text": "{{",
				"name": "mw-template2-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-link-ground separator"
			},
			{
				"text": "y']]a",
				"name": "mw-template2-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-link-ground bracket"
			},
			{
				"text": "l",
				"name": "mw-template-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-template-link-ground squareBracket"
			},
			{
				"text": "l",
				"name": "mw-template-link-ground attributeValue"
			}
		]
	},
	{
		"desc": "Preprocessor precedence 8: broken language converter is rightmost opening",
		"wikitext": "[[Foo-{R|raw]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo-{R",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "raw",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Preprocessor precedence 9: groups of braces",
		"wikitext": "{{Preprocessor precedence 9|Four|Bullet|1|2}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Preprocessor precedence 9",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Four",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Bullet",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "2",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Preprocessor precedence 10: groups of braces with leading dash",
		"wikitext": "{{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Preprocessor precedence 10",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Three",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "raw2",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "Bullet",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "2",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Preprocessor precedence 11: found during visual diff testing",
		"wikitext": "{{#tag:span|-{{#tag:span|-{{1x|x}}}}}}\n\n{{1x|-{{1x|-{{1x|x}}}}}}\n\n{{1x|-{{1x|x}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "span",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "{{",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext2-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": "span",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext2-ground punctuation"
			},
			{
				"text": "-",
				"name": "mw-ext2-ground unit"
			},
			{
				"text": "{{",
				"name": "mw-template-ext2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ext2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ext2-ground separator"
			},
			{
				"text": "x",
				"name": "mw-template-ext2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ext2-ground bracket"
			},
			{
				"text": "}}",
				"name": "mw-ext2-ground paren"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "-",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "-",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template3-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template3-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template3-ground separator"
			},
			{
				"text": "x",
				"name": "mw-template3-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template3-ground bracket"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "-",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "x",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Preprocessor precedence 13: broken language converter in external link",
		"wikitext": "*[http://example.com/-{foo Example in URL]\n*[http://example.com Example in -{link} description]\n*{{1x|[http://example.com/-{foo Breaks template, however]}}",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com/-{foo",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "Example in URL",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "Example in ",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "-{",
				"name": "mw-link-ground mw-conversion-bracket"
			},
			{
				"text": "link} description]",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "*",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "[",
				"name": "mw-template-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-template-link-ground namespace"
			},
			{
				"text": "example.com/-{foo",
				"name": "mw-template-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-template-link-ground"
			},
			{
				"text": "Breaks template, however",
				"name": "mw-template-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-template-link-ground modifier"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			}
		]
	},
	{
		"desc": "Preprocessor precedence 14: broken language converter in comment",
		"wikitext": "*<!--{{foo}}-->...should be ok\n*<!---{{foo}}-->...extra dashes\n*{{1x|foo<!-- -{bar} -->bat}}...should be ok",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<!--{{foo}}-->",
				"name": "comment"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<!---{{foo}}-->",
				"name": "comment"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<!-- -{bar} -->",
				"name": "mw-template-ground comment"
			},
			{
				"text": "bat",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Preprocessor precedence 15: broken brace markup in headings",
		"wikitext": "__NOTOC__ __NOEDITSECTION__\n===1 foo[bar 1===\n1\n===2 foo[[bar 2===\n2\n===3 foo{bar 3===\n3\n===4 foo{{bar 4===\n4\n===5 foo{{{bar 5===\n5\n===6 foo-{bar 6===\n6",
		"nodes": [
			{
				"text": "__NOTOC__",
				"name": "controlKeyword"
			},
			{
				"text": "__NOEDITSECTION__",
				"name": "controlKeyword"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "1 foo[bar 1",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "2 foo",
				"name": "mw-section"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "bar 2===",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "2",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "3 foo{bar 3",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "4 foo",
				"name": "mw-section"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "bar 4===",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "4",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "5 foo",
				"name": "mw-section"
			},
			{
				"text": "{{{",
				"name": "brace"
			},
			{
				"text": "bar 5===",
				"name": "variableName"
			},
			{
				"text": "5",
				"name": "variableName"
			},
			{
				"text": "===6 foo-{bar 6===",
				"name": "variableName"
			},
			{
				"text": "6",
				"name": "variableName"
			}
		]
	},
	{
		"desc": "Preprocessor precedence 16: matching closing braces to opening braces",
		"wikitext": "-{{{1x|foo}}bar}-",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Preprocessor precedence 17: template w/o target shouldn't prevent closing",
		"wikitext": "{{1x|hi {{}}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "hi ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Preprocessor precedence 19: break syntax",
		"wikitext": "-{{",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Language converter over extlink",
		"wikitext": "{{1x\n| [-{oh no]}-]\n}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "| ",
				"name": "mw-template-ground separator"
			},
			{
				"text": "[",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "-{",
				"name": "mw-template-ground mw-conversion-bracket"
			},
			{
				"text": "oh no]",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}-",
				"name": "mw-template-ground mw-conversion-bracket"
			},
			{
				"text": "]",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "pre-save transform: subst:",
		"wikitext": "{{subst:test}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "subst",
				"name": "mw-template-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-template-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "pre-save transform: normal template",
		"wikitext": "{{test}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "test",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "pre-save transform: nonexistent template",
		"wikitext": "{{thistemplatedoesnotexist}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "thistemplatedoesnotexist",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "pre-save transform: subst magic variables",
		"wikitext": "{{subst:SITENAME}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "subst",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "SITENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "pre-save transform: subst: templates with parameters",
		"wikitext": "{{subst:paramtest|param=\"something else\"}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "subst",
				"name": "mw-template-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-template-ground punctuation"
			},
			{
				"text": "paramtest",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "param=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "\"something else\"",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "pre-save transform: nowiki in subst (T3188)",
		"wikitext": "{{subst:nowikitest}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "subst",
				"name": "mw-template-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-template-ground punctuation"
			},
			{
				"text": "nowikitest",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "pre-save transform: comment in subst (T3936)",
		"wikitext": "{{subst:commenttest}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "subst",
				"name": "mw-template-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-template-ground punctuation"
			},
			{
				"text": "commenttest",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "pre-save transform: unclosed tag",
		"wikitext": "<nowiki>'''not wiki'''",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "'''not wiki'''",
				"name": "mw-tag-nowiki"
			}
		]
	},
	{
		"desc": "pre-save transform: mixed tag case",
		"wikitext": "<NOwiki>'''not wiki'''</noWIKI>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "NOwiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "'''not wiki'''",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "noWIKI",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "pre-save transform: unclosed comment in <nowiki>",
		"wikitext": "wiki<nowiki>nowiki<!--nowiki</nowiki>wiki",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki<!--nowiki",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "(confirming safety of fix for subst T3936)",
		"wikitext": "{{Template:dangerous}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "Template:dangerous",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "pre-save transform: comment containing gallery (T7024)",
		"wikitext": "<!-- <gallery>data</gallery> -->",
		"nodes": [
			{
				"text": "<!-- <gallery>data</gallery> -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "pre-save transform: comment containing nowiki",
		"wikitext": "<!-- <nowiki>data</nowiki> -->",
		"nodes": [
			{
				"text": "<!-- <nowiki>data</nowiki> -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "pre-save transform: <noinclude> in subst (T5298)",
		"wikitext": "{{subst:Includes}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "subst",
				"name": "mw-template-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-template-ground punctuation"
			},
			{
				"text": "Includes",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "pre-save transform: <onlyinclude> in subst (T5298)",
		"wikitext": "{{subst:Includes2}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "subst",
				"name": "mw-template-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-template-ground punctuation"
			},
			{
				"text": "Includes2",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T24297: safesubst: works during PST",
		"wikitext": "{{subst:SafeSubstTest}}{{safesubst:SubstTest}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "subst",
				"name": "mw-template-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-template-ground punctuation"
			},
			{
				"text": "SafeSubstTest",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "safesubst",
				"name": "mw-template-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-template-ground punctuation"
			},
			{
				"text": "SubstTest",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T24297: safesubst: works during normal parse",
		"wikitext": "{{SafeSubstTest}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "SafeSubstTest",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "subst: does not work during normal parse",
		"wikitext": "{{SubstTest}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "SubstTest",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "safesubst self: does not work during normal parse - T276476",
		"wikitext": "{{SafeSubstSelfTest}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "SafeSubstSelfTest",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Template named safesubst - T309405",
		"wikitext": "{{safesubst|123}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "safesubst",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "123",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "subst: with whitespace - variable vs. template",
		"wikitext": "Variable: {{subst: ROOTPAGENAME}}\nVariable: {{subst:ROOTPAGENAME}}\nTemplate: {{subst: ROOTPAGENAME|template}}\nTemplate: {{subst:ROOTPAGENAME|template}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "subst",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ": ",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ROOTPAGENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "subst",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "ROOTPAGENAME",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "subst",
				"name": "mw-template-ground keyword"
			},
			{
				"text": ": ",
				"name": "mw-template-ground punctuation"
			},
			{
				"text": "ROOTPAGENAME",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "template",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "subst",
				"name": "mw-template-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-template-ground punctuation"
			},
			{
				"text": "ROOTPAGENAME",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "template",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "pre-save transform: context links (\"pipe trick\")",
		"wikitext": "[[Article (context)|]]\n[[Bar:Article|]]\n[[:Bar:Article|]]\n[[Bar:Article (context)|]]\n[[:Bar:Article (context)|]]\n[[|Article]]\n[[|Article (context)]]\n[[Bar:X (Y) Z|]]\n[[:Bar:X (Y) Z|]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Article (context)",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Bar:Article",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Bar:Article",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Bar:Article (context)",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Bar:Article (context)",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Bar:X (Y) Z",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Bar:X (Y) Z",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "pre-save transform: context links (\"pipe trick\") with interwiki prefix",
		"wikitext": "[[interwiki:Article|]]\n[[:interwiki:Article|]]\n[[interwiki:Bar:Article|]]\n[[:interwiki:Bar:Article|]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "interwiki:Article",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":interwiki:Article",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "interwiki:Bar:Article",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":interwiki:Bar:Article",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "pre-save transform: context links (\"pipe trick\") with parens in title",
		"wikitext": "[[|Article]]",
		"nodes": []
	},
	{
		"desc": "pre-save transform: context links (\"pipe trick\") with single, double-width and Arabic comma in title",
		"wikitext": "[[|Otherplace]]\n[[Otherplace, Elsewhere|]]\n[[Otherplace, Elsewhere, Anywhere|]]\n[[Otherplace，Elsewhere|]]\n[[Otherplace، Elsewhere|]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Otherplace, Elsewhere",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Otherplace, Elsewhere, Anywhere",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Otherplace，Elsewhere",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Otherplace، Elsewhere",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "pre-save transform: context links (\"pipe trick\") with parens and comma",
		"wikitext": "[[|Otherplace]]\n[[Otherplace (place), Elsewhere|]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Otherplace (place), Elsewhere",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "pre-save transform: context links (\"pipe trick\") with comma and parens",
		"wikitext": "[[|Yes, you.]]\n[[Me, Myself, and I (1937 song)|]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Me, Myself, and I (1937 song)",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "pre-save transform: context links (\"pipe trick\") with namespace",
		"wikitext": "[[|Article]]",
		"nodes": []
	},
	{
		"desc": "pre-save transform: context links (\"pipe trick\") with namespace and parens",
		"wikitext": "[[|Article]]",
		"nodes": []
	},
	{
		"desc": "pre-save transform: context links (\"pipe trick\") with namespace and comma",
		"wikitext": "[[|Article]]",
		"nodes": []
	},
	{
		"desc": "pre-save transform: context links (\"pipe trick\") with namespace, comma and parens",
		"wikitext": "[[|Article]]",
		"nodes": []
	},
	{
		"desc": "pre-save transform: context links (\"pipe trick\") with namespace, parens and comma",
		"wikitext": "[[|Article]]",
		"nodes": []
	},
	{
		"desc": "pre-save transform: context links (\"pipe trick\") with full-width parens and no space (Japanese and Chinese style, T32149)",
		"wikitext": "[[Article（context）|]]\n[[Bar:Article（context）|]]\n[[:Bar:Article（context）|]]\n[[|Article（context）]]\n[[Bar:X（Y）Z|]]\n[[:Bar:X（Y）Z|]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Article（context）",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Bar:Article（context）",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Bar:Article（context）",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Bar:X（Y）Z",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Bar:X（Y）Z",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "pre-save transform: context links (\"pipe trick\") with full-width parens and space (Japanese and Chinese style, T32149)",
		"wikitext": "[[Article （context）|]]\n[[Bar:Article （context）|]]\n[[:Bar:Article （context）|]]\n[[|Article （context）]]\n[[Bar:X （Y） Z|]]\n[[:Bar:X （Y） Z|]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Article （context）",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Bar:Article （context）",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Bar:Article （context）",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Bar:X （Y） Z",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Bar:X （Y） Z",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "pre-save transform: context links (\"pipe trick\") with parens and no space (Korean style, T32149)",
		"wikitext": "[[Article(context)|]]\n[[Bar:Article(context)|]]\n[[:Bar:Article(context)|]]\n[[|Article(context)]]\n[[Bar:X(Y)Z|]]\n[[:Bar:X(Y)Z|]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Article(context)",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Bar:Article(context)",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Bar:Article(context)",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Bar:X(Y)Z",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Bar:X(Y)Z",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "pre-save transform: context links (\"pipe trick\") with commas (T23660)",
		"wikitext": "[[Article (context), context|]]\n[[Article (context)，context|]]\n[[Bar:Article (context), context|]]\n[[Bar:Article (context)，context|]]\n[[:Bar:Article (context), context|]]\n[[:Bar:Article (context)，context|]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Article (context), context",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Article (context)，context",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Bar:Article (context), context",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Bar:Article (context)，context",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Bar:Article (context), context",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Bar:Article (context)，context",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Parsoid: backwards pipe trick",
		"wikitext": "[[|'''bar''']]",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bar",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "pre-save transform: trim trailing empty lines",
		"wikitext": "Empty lines are trimmed",
		"nodes": []
	},
	{
		"desc": "pre-save transform: Signature expansion",
		"wikitext": "* ~~~\n* ~~~~\n* ~~~~~\n* <noinclude>~~~</noinclude>\n* <includeonly>~~~</includeonly>\n* <onlyinclude>~~~</onlyinclude>",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "~~~",
				"name": "quote"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "~~~~",
				"name": "quote"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "~~~~~",
				"name": "quote"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "~~~",
				"name": "quote"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "~~~",
				"name": "quote"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "~~~",
				"name": "quote"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "ParserOutput flags from signature expansion (T84843)",
		"wikitext": "~~~~",
		"nodes": [
			{
				"text": "~~~~",
				"name": "quote"
			}
		]
	},
	{
		"desc": "pre-save transform: Signature expansion in nowiki tags (T2093)",
		"wikitext": "Shall not expand:\n\n<nowiki>~~~~</nowiki>\n\n<includeonly><nowiki>~~~~</nowiki></includeonly>\n\n<noinclude><nowiki>~~~~</nowiki></noinclude>\n\n<onlyinclude><nowiki>~~~~</nowiki></onlyinclude>\n\n{{subst:Foo}} shall be converted to FOO\n\nAs well as inside noinclude/onlyinclude\n<noinclude>{{subst:Foo}}</noinclude>\n<onlyinclude>{{subst:Foo}}</onlyinclude>\n\nBut not inside includeonly\n<includeonly>{{subst:Foo}}</includeonly>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "~~~~",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "~~~~",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "~~~~",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "~~~~",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "subst",
				"name": "mw-template-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-template-ground punctuation"
			},
			{
				"text": "Foo",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "subst",
				"name": "mw-template-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-template-ground punctuation"
			},
			{
				"text": "Foo",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "noinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "subst",
				"name": "mw-template-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-template-ground punctuation"
			},
			{
				"text": "Foo",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "onlyinclude",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "subst",
				"name": "mw-template-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-template-ground punctuation"
			},
			{
				"text": "Foo",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "includeonly",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Parsoid: Recognize nowiki with trailing space in tags",
		"wikitext": "<nowiki ><div>[[foo]]</nowiki >\n\na<nowiki / >b\n\nc<nowiki />d\n\ne<nowiki/ >f",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki ",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<div>[[foo]]",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki ",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki ",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/ ",
				"name": "mw-exttag-attribute mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "b",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "c<nowiki />d",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "e<nowiki/ >f",
				"name": "mw-tag-nowiki"
			}
		]
	},
	{
		"desc": "Category with empty sort key",
		"wikitext": "[[Category:MediaWiki User's Guide|]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:MediaWiki User's Guide",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Category with empty sort key and parentheses",
		"wikitext": "[[Category:Foo (bar)|]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo (bar)",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Category with link tail",
		"wikitext": "123[[Category:Foo]]456",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Category with template",
		"wikitext": "[[Category:{{1x|Foo}}]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "Foo",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Category with template in sort key",
		"wikitext": "[[Category:Foo|{{1x|Bar}}]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "Bar",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Category with template in sort key and title",
		"wikitext": "[[Category:{{1x|Foo}}|{{1x|Bar}}]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "Foo",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "Bar",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Tildes in comments",
		"wikitext": "<!-- ~~~~ -->",
		"nodes": [
			{
				"text": "<!-- ~~~~ -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Quotes",
		"wikitext": "Normal text. '''Bold text.''' Normal text. ''Italic text.''\n\nNormal text. '''''Bold italic text.''''' Normal text.",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "Bold text.",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "Italic text.",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "Bold italic text.",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Quotes wrapping HTML table",
		"wikitext": "'''<table><tr><td>hi</td></tr></table>'''",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "hi",
				"name": "mw-strong"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Unclosed and unmatched quotes",
		"wikitext": "'''''Bold italic text '''with bold deactivated''' in between.'''''\n\n'''''Bold italic text ''with italic deactivated'' in between.'''''\n\n'''Bold text..\n\n..spanning two paragraphs (should not work).'''\n\n'''Bold tag left open\n\n''Italic tag left open\n\nNormal text.\n\n<!-- Unmatching number of opening, closing tags: -->\n'''This year''''s election ''should'' beat '''last year''''s.\n\n''Tom'''s car is bigger than ''Susan'''s.\n\nPlain ''italic'''s plain",
		"nodes": [
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "Bold italic text ",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "with bold deactivated",
				"name": "mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": " in between.",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "Bold italic text ",
				"name": "mw-strong mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "with italic deactivated",
				"name": "mw-strong"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": " in between.",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "Bold text..",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "Bold tag left open",
				"name": "mw-strong"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "Italic tag left open",
				"name": "mw-em"
			},
			{
				"text": "<!-- Unmatching number of opening, closing tags: -->",
				"name": "comment"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "This year'",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "should",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "last year'",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "Tom",
				"name": "mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "s car is bigger than ",
				"name": "mw-strong mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "Susan",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "italic'",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold",
		"wikitext": "*plain\n*plain''italic''plain\n*plain''italic''plain''italic''plain\n*plain'''bold'''plain\n*plain'''bold'''plain'''bold'''plain\n*plain''italic''plain'''bold'''plain\n*plain'''bold'''plain''italic''plain\n*plain''italic'''bold-italic'''italic''plain\n*plain'''bold''bold-italic''bold'''plain\n*plain'''''bold-italic'''italic''plain\n*plain'''''bold-italic''bold'''plain\n*plain''italic'''bold-italic'''''plain\n*plain'''bold''bold-italic'''''plain\n*plain l'''italic''plain\n*plain l''''bold''' plain",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "italic",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "italic",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "italic",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bold",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bold",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bold",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "italic",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bold",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bold",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "italic",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "italic",
				"name": "mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bold-italic",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "italic",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bold",
				"name": "mw-strong"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "bold-italic",
				"name": "mw-strong mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "bold",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "bold-italic",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "italic",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "bold-italic",
				"name": "mw-strong mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "bold",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "italic",
				"name": "mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bold-italic",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bold",
				"name": "mw-strong"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "bold-italic",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "italic",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bold",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and possessives (1)",
		"wikitext": "obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Lunar Prospector",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-em"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "'",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and possessives (2)",
		"wikitext": "'''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes",
		"nodes": [
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "Flaming Pie",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "Flaming Pie'",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and possessives (3)",
		"wikitext": "The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "Sebastián Covarrubias'",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "Tesoro de la lengua castellana o española",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "Vocabolario dell'",
				"name": "mw-em"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Accademia della Crusca",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-em"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "Dictionnaire Universel",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 2-quote opening sequence: (2,2)",
		"wikitext": "''foo''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 2-quote opening sequence: (2,3)",
		"wikitext": "''foo'''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo'",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 2-quote opening sequence: (2,4)",
		"wikitext": "''foo''''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo''",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki",
		"wikitext": "''foo<nowiki>''</nowiki>''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 2-quote opening sequence: (2,5)",
		"wikitext": "''foo'''''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 2-quote opening sequence: (2,5-3)",
		"wikitext": "''foo''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 3-quote opening sequence: (3,2)",
		"wikitext": "'''foo''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 3-quote opening sequence: (3,3)",
		"wikitext": "'''foo'''",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 3-quote opening sequence: (3,4)",
		"wikitext": "'''foo''''",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo'",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 3-quote opening sequence: (3,5)",
		"wikitext": "'''foo'''''",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": "'''''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 3-quote opening sequence: (3,5-2)",
		"wikitext": "'''foo'''",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 4-quote opening sequence: (4,2)",
		"wikitext": "''''foo''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki",
		"wikitext": "<nowiki>''</nowiki>''foo''",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 4-quote opening sequence: (4,3)",
		"wikitext": "''''foo'''",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 4-quote opening sequence: (4,4)",
		"wikitext": "''''foo''''",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo'",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki",
		"wikitext": "'<nowiki/>'''foo''''",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo'",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 4-quote opening sequence: (4,5)",
		"wikitext": "''''foo'''''",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": "'''''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 4-quote opening sequence: (4,5-2)",
		"wikitext": "''''foo'''",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 5-quote opening sequence: (5,2)",
		"wikitext": "'''''foo''",
		"nodes": [
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 5-quote opening sequence: (5,2+3)",
		"wikitext": "'''''foo'''''",
		"nodes": [
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 5-quote opening sequence: (5,3)",
		"wikitext": "'''''foo'''",
		"nodes": [
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 5-quote opening sequence: (5,3+2)",
		"wikitext": "'''''foo'''''",
		"nodes": [
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 5-quote opening sequence: (5,4)",
		"wikitext": "'''''foo''''",
		"nodes": [
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "foo'",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 5-quote opening sequence: (5,5)",
		"wikitext": "'''''foo'''''",
		"nodes": [
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: 5-quote opening sequence: (5,6)",
		"wikitext": "'''''foo''''''",
		"nodes": [
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "foo'",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: multiple quote sequences: (2,4,2)",
		"wikitext": "''foo''''bar''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo'",
				"name": "mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bar",
				"name": "mw-strong mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki",
		"wikitext": "''foo'<nowiki/>'''bar'''''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo'",
				"name": "mw-em"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bar",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: multiple quote sequences: (2,4,3)",
		"wikitext": "''foo''''bar'''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo'",
				"name": "mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bar",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki",
		"wikitext": "''foo'<nowiki/>'''bar'''''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo'",
				"name": "mw-em"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bar",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: multiple quote sequences: (2,4,4)",
		"wikitext": "''foo''''bar''''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo'",
				"name": "mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bar'",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki",
		"wikitext": "''foo'<nowiki/>'''bar'<nowiki/>'''''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo'",
				"name": "mw-em"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bar'",
				"name": "mw-strong mw-em"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "'''''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: multiple quote sequences: (3,4,2)",
		"wikitext": "'''foo''''bar''",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo'",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: multiple quote sequences: (3,4,2-2)",
		"wikitext": "'''foo''''bar",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo'",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: multiple quote sequences: (3,4,3)",
		"wikitext": "'''foo''''bar'''",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo'",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: multiple quote sequences: (3,4,3-3)",
		"wikitext": "'''foo''''bar",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo'",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: other quote tests: (2,3,5)",
		"wikitext": "''this is about '''foo's family'''''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "this is about ",
				"name": "mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo's family",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: other quote tests: (2,(3,3),2)",
		"wikitext": "''this is about '''foo's''' family''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "this is about ",
				"name": "mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo's",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": " family",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: other quote tests: (3,2,3,2)",
		"wikitext": "'''this is about ''foo'''s family''",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "this is about ",
				"name": "mw-strong"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "s family",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: other quote tests: (3,2,3+2+2,2)",
		"wikitext": "'''this is about ''foo'''''<nowiki/>''s family''",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "this is about ",
				"name": "mw-strong"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "s family",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: other quote tests: (3,2,3,3)",
		"wikitext": "'''this is about ''foo'''s family'''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "this is about ",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "s family",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italics and bold: other quote tests: (3,(2,2),3)",
		"wikitext": "'''this is about ''foo's'' family'''",
		"nodes": [
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "this is about ",
				"name": "mw-strong"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo's",
				"name": "mw-strong mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": " family",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Italicized possessive",
		"wikitext": "The ''[[Main Page]]'''s talk page.",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-em"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "'",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Quote balancing context should be restricted to td/th cells on the same wikitext line",
		"wikitext": "{|\n!''a!!''b\n|''a||''b\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "a",
				"name": "mw-strong mw-em"
			},
			{
				"text": "!!",
				"name": "typeOperator"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "b",
				"name": "mw-strong mw-em"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "a",
				"name": "mw-em"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "b",
				"name": "mw-em"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Bold conversion test",
		"wikitext": "a b'''c ''d e'''f'' g h'''i ''j",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "c ",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "f",
				"name": "mw-strong"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": " g h",
				"name": "mw-strong mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "i ",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "1. Simple redirect to page",
		"wikitext": "#REDIRECT [[Main Page]]",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "2. Other redirect variants",
		"wikitext": "#REDIRECT [[Main_Page]]",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main_Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "3. Other redirect variants",
		"wikitext": "#REDIRECT [[<nowiki>[[Bar]]</nowiki>]]",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<nowiki>[[Bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "</nowiki",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "4. Redirect to a templated destination",
		"wikitext": "#REDIRECT [[{{1x|Foo}}bar]]",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-link-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-link-ground separator"
			},
			{
				"text": "Foo",
				"name": "mw-template-link-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-link-ground bracket"
			},
			{
				"text": "bar",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Empty redirect",
		"wikitext": "#REDIRECT [[]]",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			}
		]
	},
	{
		"desc": "Optional colon in #REDIRECT",
		"wikitext": "#REDIRECT:[[Main Page]]",
		"nodes": [
			{
				"text": "#REDIRECT:",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Whitespace in #REDIRECT with optional colon",
		"wikitext": " \n #REDIRECT \n: \n[[Main Page]]",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Piped link in #REDIRECT",
		"wikitext": "#REDIRECT [[Main Page|bar]]",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Redirect to category (T104502)",
		"wikitext": "#REDIRECT [[Category:Foo]]",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Redirect to category with URL encoding (T104502)",
		"wikitext": "#REDIRECT [[Category%3AFoo]]",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category%3AFoo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Redirect to category page",
		"wikitext": "#REDIRECT [[:Category:Foo]]",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Redirect to image page (1)",
		"wikitext": "#REDIRECT [[File:Wiki.png]]",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Wiki.png",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Redirect to image page (2)",
		"wikitext": "#REDIRECT [[Image:Wiki.png]]",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Image:Wiki.png",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Redirect to language (1) (T104918)",
		"wikitext": "#REDIRECT [[en:File:Wiki.png]]",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "en:File:Wiki.png",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Redirect to language (2) (T104918)",
		"wikitext": "#REDIRECT [[:en:File:Wiki.png]]",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": ":en:File:Wiki.png",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Redirect to interwiki (T104918)",
		"wikitext": "#REDIRECT [[meatball:File:Wiki.png]]",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "meatball:File:Wiki.png",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Redirect syntax under text isn't considered a redirect",
		"wikitext": "some text\n\n#redirect [[Main Page]]",
		"nodes": [
			{
				"text": "#",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "New redirect",
		"wikitext": "#REDIRECT [[Foo]]\nFoo",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Redirect followed by block on the same line",
		"wikitext": "#REDIRECT [[Main Page]]<!-- haha -->==hi==",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<!-- haha -->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Redirect followed by horizontal rule on the same line",
		"wikitext": "#REDIRECT [[Main Page]]----",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Redirect followed by a newline",
		"wikitext": "#REDIRECT [[Main Page]]\nA newline",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Redirect followed by multiple newlines",
		"wikitext": "#REDIRECT [[Main Page]]\n\n\nA newline",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Drop duplicate redirects",
		"wikitext": "#REDIRECT [[Foo]]",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Redirect containing double quotes and spaces",
		"wikitext": "#REDIRECT [[Cool \"Gator\"]]",
		"nodes": [
			{
				"text": "#REDIRECT ",
				"name": "mw-redirect"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Cool \"Gator\"",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Broken redirect shouldn't crash parsoid (T332242)",
		"wikitext": "<!-- Not a valid redirect nor a valid parser function -->\n{{#REDIRECT [[]]}}",
		"nodes": [
			{
				"text": "<!-- Not a valid redirect nor a valid parser function -->",
				"name": "comment"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#REDIRECT [[]]",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Ordered lists directly following each other should not be merged",
		"wikitext": "<ref>reference text</ref>\n# content list item\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "reference text",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "#",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Enabling responsive references by default should add a <div> wrapper",
		"wikitext": "<ref>a</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Enabling responsive references in the tag should add a <div> wrapper",
		"wikitext": "<ref>a</ref>\n<references responsive=\"1\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "responsive=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Disabling responsive references in the tag should remove the <div> wrapper",
		"wikitext": "<ref>a</ref>\n<references responsive=\"0\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "responsive=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"0\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T241303: responsive attribute with no value should *not* disable the wrapper <div>",
		"wikitext": "<ref>a</ref>\n<references responsive />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "responsive ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T241303: responsive attribute with an empty value should *not* disable the wrapper <div>",
		"wikitext": "<ref>a</ref>\n<references responsive=\"\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "responsive=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "9 references should *not* enable the column mode",
		"wikitext": "<ref>a</ref>\n<ref>a</ref>\n<ref>a</ref>\n<ref>a</ref>\n<ref>a</ref>\n<ref>a</ref>\n<ref>a</ref>\n<ref>a</ref>\n<ref>a</ref>\n<ref>a</ref>\n<references responsive=\"true\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "responsive=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"true\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "10 references should enable the column mode",
		"wikitext": "<ref>a</ref>\n<ref>a</ref>\n<ref>a</ref>\n<ref>a</ref>\n<ref>a</ref>\n<ref>a</ref>\n<ref>a</ref>\n<ref>a</ref>\n<ref>a</ref>\n<ref>a</ref>\n<ref>a</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "#len",
		"wikitext": "{{#len:}}\n{{#len:0}}\n{{#len:test}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#len",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#len",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "0",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#len",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "test",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#urldecode",
		"wikitext": "{{#urldecode:}}\n{{#urldecode:foo%20bar}}\n{{#urldecode:%D0%9C%D0%B5%D0%B4%D0%B8%D0%B0%D0%92%D0%B8%D0%BA%D0%B8}}\n{{#urldecode: some unescaped string}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#urldecode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#urldecode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "foo%20bar",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#urldecode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "%D0%9C%D0%B5%D0%B4%D0%B8%D0%B0%D0%92%D0%B8%D0%BA%D0%B8",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#urldecode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": " some unescaped string",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#pos",
		"wikitext": "{{#pos:Žmržlina|žlina}}\n{{#pos:stringstring|str|4}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#pos",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Žmržlina",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "žlina",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#pos",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "stringstring",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "str",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "4",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#pos with too large offset (T209600)",
		"wikitext": "{{#pos:FooBar|Foo|32}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#pos",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "FooBar",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Foo",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "32",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#explode with negative offset (T403241)",
		"wikitext": "{{#explode:Foo*Bar|*|-1}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#explode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Foo*Bar",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "*",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "-1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#explode with bad negative offset (T403241)",
		"wikitext": "{{#explode:Foo*Bar|*|- 1}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#explode",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "Foo*Bar",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "*",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "- 1",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Subreferencing attribute blocked without feature flag",
		"wikitext": "<ref details=\"abc\" name=\"a\">def</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"abc\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "def",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T397760: Details with no name but feature flag disabled",
		"wikitext": "<ref details=\"y\">x</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"y\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "x",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Subreferencing attribute allowed with feature flag set",
		"wikitext": "<ref details=\"0\" name=\"a\">def</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"0\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "def",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Subreference round trip with original attribute order",
		"wikitext": "<ref name=\"a\" details=\"0\">def</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"0\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "def",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Unnamed main reference with a lonely sub-ref, neither can be reused",
		"wikitext": "<ref details=\"abc\">def</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"abc\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "def",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Named main ref with inline details",
		"wikitext": "<ref details=\"p. 1\" name=\"book\">The book</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p. 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "The book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Empty sub-referencing attribute with no meaningful content",
		"wikitext": "<ref details=\"   \" name=\"a\">def</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"   \"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "def",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Multiple subreferences",
		"wikitext": "<ref details=\"abc\" name=\"a\">def</ref> <ref details=\"ghi\" name=\"b\">jkl</ref>\n<references>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"abc\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "def",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"ghi\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "jkl",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Parent reference used before sub-reference",
		"wikitext": "<ref name=\"book\">The book</ref> <ref details=\"p. 1\" name=\"book\" />\n<references>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "The book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p. 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Parent reference used after sub-reference",
		"wikitext": "<ref details=\"p. 1\" name=\"book\" /> <ref name=\"book\">The book</ref>\n<references>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p. 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "The book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Main+details reference used after sub-reference",
		"wikitext": "<ref details=\"p. 1\" name=\"book\" /> <ref details=\"p. 2\" name=\"book\">The book</ref>\n<references>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p. 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p. 2\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "The book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Main+details reference used after sub-reference and standalone main ref",
		"wikitext": "<ref details=\"p. 1\" name=\"book\" /> <ref details=\"p. 2\" name=\"book\">The book</ref> <ref name=\"book\">The book</ref>\n<references>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p. 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p. 2\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "The book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "The book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Unused, list-defined parent reference",
		"wikitext": "<ref details=\"p. 1\" name=\"book\" />\n<references>\n<ref name=\"book\">The book</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p. 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "The book",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "No main content due to missing name or empty content",
		"wikitext": "<ref details=\"page 1\" />\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Empty content and no name",
		"wikitext": "<ref details=\"page 1\"></ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": "></",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "No main content due to missing named main ref",
		"wikitext": "<ref details=\"page 1\" name=\"missingbook\" />\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"missingbook\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Empty content and missing named main ref",
		"wikitext": "<ref details=\"page 1\" name=\"missingbook\"></ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"missingbook\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": "></",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T392195: Details get lost on sub-ref with empty main content",
		"wikitext": "<ref name=\"book\">Book</ref><ref details=\"page 1\" name=\"book\"></ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "><",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": "></",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Empty details content with name, ignored outside of <references>",
		"wikitext": "<ref details=\"\" name=\"a\">Book</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Empty details content without name, ignored outside of <references>",
		"wikitext": "<ref details=\"\">Book</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Empty details content inside of <references>",
		"wikitext": "<ref name=\"a\" />\n<references>\n<ref details=\"\" name=\"a\">Book</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Unused list-defined sub-ref with no name",
		"wikitext": "<references>\n<ref details=\"page 1\">Book</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 1\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Unused list-defined sub-ref with linked existing main ref",
		"wikitext": "<ref name=\"book\">Book</ref>\n<references>\n<ref details=\"page 1\" name=\"book\"></ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 1\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": "></",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "There is no such thing as a list-defined sub-ref (completely unused)",
		"wikitext": "<references>\n<ref details=\"p. 1\" name=\"book\">The book</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p. 1\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "The book",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Unused list defined sub-ref with used main content",
		"wikitext": "<ref name=\"book\" />\n<references>\n<ref details=\"page 1\" name=\"book\">Book</ref>\n<ref details=\"page 2\" name=\"book\">Book</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 1\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 2\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Unused list defined sub-ref with used main content (same as above but with #tag)",
		"wikitext": "<ref name=\"book\" />\n{{#tag:references|<ref details=\"page 1\" name=\"book\">Book</ref>\n<ref details=\"page 2\" name=\"book\">Book</ref>}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "references",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 1\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 2\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "There is no such thing as a list-defined sub-ref (duplicate main content)",
		"wikitext": "<ref name=\"book\">The book</ref>\n<references>\n<ref details=\"p. 1\" name=\"book\">The book</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "The book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p. 1\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "The book",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Unused list defined sub-ref due to duplicate details content",
		"wikitext": "<ref details=\"page 1\" name=\"book\" />\n<references>\n<ref details=\"page 1\" name=\"book\">Book</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 1\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Conflicting main content",
		"wikitext": "<ref details=\"page 1\" name=\"book\">Book</ref> <ref details=\"page 2\" name=\"book\">Book, but different</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 2\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book, but different",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Repeating the main content when using details",
		"wikitext": "<ref name=\"book\">Book</ref> <ref details=\"page 1\" name=\"book\">Book</ref> <ref details=\"page 1\" name=\"book\">Book</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "T410125: Identical sub-refs in different <references> sections must be independent",
		"wikitext": "<ref name=\"a\" details=\"p1\">content</ref>\n<references>\n</references>\n<ref name=\"a\" details=\"p1\">different</ref>\n<references>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "content",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "different",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Merging sub-refs with inline main that do not repeat the main content",
		"wikitext": "<ref details=\"p1\" name=\"a\">Book</ref><ref details=\"p1\" name=\"a\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "><",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Merging sub-refs with inline main that do repeat the main content",
		"wikitext": "<ref details=\"p1\" name=\"a\">Book</ref><ref details=\"p1\" name=\"a\">Book</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "><",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Merging sub-refs with standalone main",
		"wikitext": "<ref name=\"a\">Book</ref><ref details=\"p1\" name=\"a\" /><ref details=\"p1\" name=\"a\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "><",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/><",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Merging sub-refs with multiple list-defined main refs",
		"wikitext": "<ref details=\"p1\" name=\"a\" /><ref details=\"p1\" name=\"b\" /><ref details=\"p1\" name=\"a\" /><ref details=\"p1\" name=\"b\" />\n<references>\n<ref name=\"a\">Book A</ref>\n<ref name=\"b\">Book B</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/><",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/><",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/><",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book A",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book B",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Merging sub-refs should not suppress error message for mismatching dir",
		"wikitext": "<ref name=\"a\" details=\"p1\" dir=\"rtl\">Book</ref>\n<ref name=\"a\" details=\"p1\" dir=\"ltr\" />\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " dir=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"rtl\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " dir=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"ltr\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Merging sub-refs should not suppress error message for misplaced follow",
		"wikitext": "<ref name=\"a\" details=\"p1\">Book</ref>\n<ref name=\"a\" details=\"p1\" follow=\"b\" />\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Merging sub-refs should not suppress error message for conflicting main content",
		"wikitext": "<ref name=\"a\" details=\"p1\">Book</ref>\n<ref name=\"a\" details=\"p1\">conflict</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "conflict",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Using `follow` with details on the \"main\" part",
		"wikitext": "<ref details=\"page 1\" name=\"book\">Book</ref>\n<ref follow=\"book\">continued</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "continued",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Using `follow` with details on the \"follow\" part",
		"wikitext": "<ref name=\"book\">Book</ref> <ref details=\"page 1\" follow=\"book\">continued</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " follow=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "continued",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Details include basic wikitext syntax",
		"wikitext": "<ref details=\"''abc''\" name=\"a\">def</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"''abc''\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "def",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Details include template invocation",
		"wikitext": "<ref details=\"{{Deco-z|abc}}\" name=\"a\">def</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"{{Deco-z|abc}}\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "def",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Details include another, nested ref tag",
		"wikitext": "<ref name=x>x</ref>\n<ref details=\"d<ref name=x&gt;x</ref&gt;\" name=a>a</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "x",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "x",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"d<ref name=x&gt;x</ref&gt;\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Subreference doesn't affect main reference numbering",
		"wikitext": "<ref>abc</ref> <ref details=\"def\" name=\"a\">ghi</ref> <ref>jkl</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "abc",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"def\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ghi",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "jkl",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Subreference of existing ref doesn't affect main reference numbering",
		"wikitext": "<ref name=\"a\">abc</ref> <ref details=\"def\" name=\"a\">abc</ref> <ref>jkl</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "abc",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"def\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "abc",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "jkl",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Rolling back a sub-reference inside the #tag:references function",
		"wikitext": "<ref name=\"a\" />\n{{#tag:references|<ref name=\"a\">a</ref><ref details=\"p1\" name=\"b\">b</ref>}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "references",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "a",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "><",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p1\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-ext-ground mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b\"",
				"name": "mw-ext-ground mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "b",
				"name": "mw-ext-ground mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-ext-ground mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Named main ref with inline details and <references> called with #tag",
		"wikitext": "<ref details=\"p. 1\" name=\"book\">The book</ref> <ref>Another book</ref>\n{{#tag:references}}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"p. 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"book\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "The book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Another book",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "references",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Synthetic main refs from VE dont convert to list defined refs",
		"wikitext": "<ref details=\"page 1\" name=\"miller\">Miller</ref>\n<ref name=\"smith\" />\n\n<references>\n<ref name=\"smith\">Smith</ref>\n</references>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"miller\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Miller",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"smith\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "<",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-tag-references mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"smith\"",
				"name": "mw-tag-references mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "Smith",
				"name": "mw-tag-references mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-tag-references mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-tag-references mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T406002: Selser detects edits to the main part of a main+details",
		"wikitext": "<ref name=\"main\" details=\"page 1\"><span id=\"x\">Original</span>body</ref>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"main\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " details=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"page 1\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "span ",
				"name": "mw-tag-ref tagName"
			},
			{
				"text": "id=",
				"name": "mw-tag-ref attributeName"
			},
			{
				"text": "\"x\"",
				"name": "mw-tag-ref mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "Original",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "span",
				"name": "mw-tag-ref tagName"
			},
			{
				"text": ">",
				"name": "mw-tag-ref angleBracket"
			},
			{
				"text": "body",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			}
		]
	},
	{
		"desc": "Non-existent language",
		"wikitext": "<source lang=\"doesnotexist\">\nfoobar\n</source>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source ",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": "lang=",
				"name": "mw-exttag-attribute mw-ext-source"
			},
			{
				"text": "\"doesnotexist\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "foobar",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			}
		]
	},
	{
		"desc": "No language specified",
		"wikitext": "<source>\nfoo\n</source>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "foo",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			}
		]
	},
	{
		"desc": "No language specified (no wellformed xml)",
		"wikitext": "<source>\nbar\n</source>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "bar",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			}
		]
	},
	{
		"desc": "XSS is escaped",
		"wikitext": "<source lang=\"doesnotexist\">\n<script>alert(\"pwnd\")</script>\n<IMG SRC=`javascript:alert(\"RSnake says, 'XSS'\")`>\n<IMG\nSRC=&#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#58;&#97;&#108;&#101;&#114;&#116;&#40;\n&#39;&#88;&#83;&#83;&#39;&#41;\n\\\";alert('XSS');//\n</script><script>alert('XSS');</script>\n%253cscript%253ealert(document.cookie)%253c/script%253e\n</source>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source ",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": "lang=",
				"name": "mw-exttag-attribute mw-ext-source"
			},
			{
				"text": "\"doesnotexist\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "<script>alert(\"pwnd\")</script>",
				"name": "mw-exttag"
			},
			{
				"text": "<IMG SRC=`javascript:alert(\"RSnake says, 'XSS'\")`>",
				"name": "mw-exttag"
			},
			{
				"text": "<IMG",
				"name": "mw-exttag"
			},
			{
				"text": "SRC=&#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#58;&#97;&#108;&#101;&#114;&#116;&#40;",
				"name": "mw-exttag"
			},
			{
				"text": "&#39;&#88;&#83;&#83;&#39;&#41;",
				"name": "mw-exttag"
			},
			{
				"text": "\\\";alert('XSS');//",
				"name": "mw-exttag"
			},
			{
				"text": "</script><script>alert('XSS');</script>",
				"name": "mw-exttag"
			},
			{
				"text": "%253cscript%253ealert(document.cookie)%253c/script%253e",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			}
		]
	},
	{
		"desc": "XSS is escaped (inline)",
		"wikitext": "<source lang=\"doesnotexist\" inline=\"\">\n<script>alert(\"pwnd\")</script>\n<IMG SRC=`javascript:alert(\"RSnake says, 'XSS'\")`>\n<IMG\nSRC=&#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#58;&#97;&#108;&#101;&#114;&#116;&#40;\n&#39;&#88;&#83;&#83;&#39;&#41;\n\\\";alert('XSS');//\n</script><script>alert('XSS');</script>\n%253cscript%253ealert(document.cookie)%253c/script%253e\n</source>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source ",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": "lang=",
				"name": "mw-exttag-attribute mw-ext-source"
			},
			{
				"text": "\"doesnotexist\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " inline=",
				"name": "mw-exttag-attribute mw-ext-source"
			},
			{
				"text": "\"\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "<script>alert(\"pwnd\")</script>",
				"name": "mw-exttag"
			},
			{
				"text": "<IMG SRC=`javascript:alert(\"RSnake says, 'XSS'\")`>",
				"name": "mw-exttag"
			},
			{
				"text": "<IMG",
				"name": "mw-exttag"
			},
			{
				"text": "SRC=&#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#58;&#97;&#108;&#101;&#114;&#116;&#40;",
				"name": "mw-exttag"
			},
			{
				"text": "&#39;&#88;&#83;&#83;&#39;&#41;",
				"name": "mw-exttag"
			},
			{
				"text": "\\\";alert('XSS');//",
				"name": "mw-exttag"
			},
			{
				"text": "</script><script>alert('XSS');</script>",
				"name": "mw-exttag"
			},
			{
				"text": "%253cscript%253ealert(document.cookie)%253c/script%253e",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			}
		]
	},
	{
		"desc": "Default behaviour (inner is pre)",
		"wikitext": "<source lang=\"javascript\">\nvar a;\n</source>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source ",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": "lang=",
				"name": "mw-exttag-attribute mw-ext-source"
			},
			{
				"text": "\"javascript\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "var a;",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			}
		]
	},
	{
		"desc": "Multiline <source/> in lists",
		"wikitext": "*<source>a\nb</source>\n\n*foo <source>a\nb</source>",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "a",
				"name": "mw-exttag"
			},
			{
				"text": "b",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "a",
				"name": "mw-exttag"
			},
			{
				"text": "b",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			}
		]
	},
	{
		"desc": "Custom attributes",
		"wikitext": "<source lang=\"javascript\" id=\"foo\" class=\"bar\" dir=\"rtl\" style=\"font-size: larger;\">var a;</source>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source ",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": "lang=",
				"name": "mw-exttag-attribute mw-ext-source"
			},
			{
				"text": "\"javascript\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " id=",
				"name": "mw-exttag-attribute mw-ext-source"
			},
			{
				"text": "\"foo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " class=",
				"name": "mw-exttag-attribute mw-ext-source"
			},
			{
				"text": "\"bar\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " dir=",
				"name": "mw-exttag-attribute mw-ext-source"
			},
			{
				"text": "\"rtl\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " style=",
				"name": "mw-exttag-attribute mw-ext-source"
			},
			{
				"text": "\"font-size: larger;\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "var a;",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			}
		]
	},
	{
		"desc": "Inline attribute (inline code)",
		"wikitext": "Text <source lang=\"javascript\" inline>var a;</source>.",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source ",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": "lang=",
				"name": "mw-exttag-attribute mw-ext-source"
			},
			{
				"text": "\"javascript\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " inline",
				"name": "mw-exttag-attribute mw-ext-source"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "var a;",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			}
		]
	},
	{
		"desc": "Enclose none (inline code)",
		"wikitext": "Text <source lang=\"javascript\" enclose=\"none\">var a;</source>.",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source ",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": "lang=",
				"name": "mw-exttag-attribute mw-ext-source"
			},
			{
				"text": "\"javascript\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " enclose=",
				"name": "mw-exttag-attribute mw-ext-source"
			},
			{
				"text": "\"none\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "var a;",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			}
		]
	},
	{
		"desc": "Enclose with nowiki\nparsoid={ \"modes\": [\"wt2html\",\"wt2wt\"], \"normalizePhp\": true }",
		"wikitext": "{{#tag:syntaxhighlight|<nowiki>foo</nowiki>|lang=\"text\"|inline=none}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "syntaxhighlight",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "foo",
				"name": "mw-ext-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-ext-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-ext-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "lang=\"text\"",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "inline=none",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Self-closing tag",
		"wikitext": "<syntaxhighlight lang=\"CSharp\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-syntaxhighlight"
			},
			{
				"text": "syntaxhighlight ",
				"name": "mw-exttag-name mw-ext-syntaxhighlight"
			},
			{
				"text": "lang=",
				"name": "mw-exttag-attribute mw-ext-syntaxhighlight"
			},
			{
				"text": "\"CSharp\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-syntaxhighlight"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-syntaxhighlight"
			}
		]
	},
	{
		"desc": "No code",
		"wikitext": "<source lang=\"CSharp\"></source>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source ",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": "lang=",
				"name": "mw-exttag-attribute mw-ext-source"
			},
			{
				"text": "\"CSharp\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": "></",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			}
		]
	},
	{
		"desc": "Just whitespace",
		"wikitext": "<source lang=\"CSharp\"> </source>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source ",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": "lang=",
				"name": "mw-exttag-attribute mw-ext-source"
			},
			{
				"text": "\"CSharp\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": " ",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-source"
			},
			{
				"text": "source",
				"name": "mw-exttag-name mw-ext-source"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-source"
			}
		]
	},
	{
		"desc": "tabs plus tidy (T32930, T59826)",
		"wikitext": "<syntaxhighlight lang=\"javascript\" enclose=\"pre\" highlight=\"2-3\">\nfunction doSomething() {\n\tvar\tfoo,\n\t\tbar;\n\tif (baz) {\n</syntaxhighlight>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-syntaxhighlight"
			},
			{
				"text": "syntaxhighlight ",
				"name": "mw-exttag-name mw-ext-syntaxhighlight"
			},
			{
				"text": "lang=",
				"name": "mw-exttag-attribute mw-ext-syntaxhighlight"
			},
			{
				"text": "\"javascript\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " enclose=",
				"name": "mw-exttag-attribute mw-ext-syntaxhighlight"
			},
			{
				"text": "\"pre\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " highlight=",
				"name": "mw-exttag-attribute mw-ext-syntaxhighlight"
			},
			{
				"text": "\"2-3\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-syntaxhighlight"
			},
			{
				"text": "function doSomething() {",
				"name": "mw-exttag"
			},
			{
				"text": "\tvar\tfoo,",
				"name": "mw-exttag"
			},
			{
				"text": "\t\tbar;",
				"name": "mw-exttag"
			},
			{
				"text": "\tif (baz) {",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-syntaxhighlight"
			},
			{
				"text": "syntaxhighlight",
				"name": "mw-exttag-name mw-ext-syntaxhighlight"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-syntaxhighlight"
			}
		]
	},
	{
		"desc": "deprecated enclose option adds tracking category",
		"wikitext": "<syntaxhighlight enclose=\"none\" lang=\"python\">print('Hi')</syntaxhighlight>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-syntaxhighlight"
			},
			{
				"text": "syntaxhighlight ",
				"name": "mw-exttag-name mw-ext-syntaxhighlight"
			},
			{
				"text": "enclose=",
				"name": "mw-exttag-attribute mw-ext-syntaxhighlight"
			},
			{
				"text": "\"none\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " lang=",
				"name": "mw-exttag-attribute mw-ext-syntaxhighlight"
			},
			{
				"text": "\"python\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-syntaxhighlight"
			},
			{
				"text": "print('Hi')",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-syntaxhighlight"
			},
			{
				"text": "syntaxhighlight",
				"name": "mw-exttag-name mw-ext-syntaxhighlight"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-syntaxhighlight"
			}
		]
	},
	{
		"desc": "A table with no data.",
		"wikitext": "{||}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|}",
				"name": "definitionOperator"
			}
		]
	},
	{
		"desc": "A table with no data (take 2)",
		"wikitext": "{|\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "A table with no data generated by a <table> markup",
		"wikitext": "<table></table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced",
		"wikitext": "{|\n<td>\n<td>\n</td>\n\n\n\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "A table with stray table end tags on start tag line (wt2html)",
		"wikitext": "{|style=\"color: red;\"|}\n\n{|style=\"color: red;\" |}\n|foo\n|}\n\n{|style=\"color: red;\"|} id=\"foo\"\n|foo\n|}\n\n{|style=\"color: red;\" |} id=\"foo\"\n|foo\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "style=",
				"name": "definitionOperator"
			},
			{
				"text": "\"color: red;\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": "|}",
				"name": "definitionOperator"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "style=",
				"name": "definitionOperator"
			},
			{
				"text": "\"color: red;\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": " |}",
				"name": "definitionOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "style=",
				"name": "definitionOperator"
			},
			{
				"text": "\"color: red;\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": "|} id=",
				"name": "definitionOperator"
			},
			{
				"text": "\"foo\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "style=",
				"name": "definitionOperator"
			},
			{
				"text": "\"color: red;\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": " |} id=",
				"name": "definitionOperator"
			},
			{
				"text": "\"foo\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "A table with nothing but a caption",
		"wikitext": "{|\n|+caption\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|+",
				"name": "typeOperator"
			},
			{
				"text": "caption",
				"name": "mw-table-caption"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "A table with caption with default-spaced attributes and a table row",
		"wikitext": "{|\n|+ style=\"color: red;\" |caption1\n|-\n|foo\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|+ ",
				"name": "typeOperator"
			},
			{
				"text": "style=\"color: red;\" ",
				"name": "mw-table-caption"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "caption1",
				"name": "mw-table-caption"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "A table with captions with non-default spaced attributes and a table row",
		"wikitext": "{|\n|+style=\"color: red;\"|caption2\n|+ style=\"color: red;\"|caption3\n|-\n|foo\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|+",
				"name": "typeOperator"
			},
			{
				"text": "style=\"color: red;\"",
				"name": "mw-table-caption"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "caption2",
				"name": "mw-table-caption"
			},
			{
				"text": "|+ ",
				"name": "typeOperator"
			},
			{
				"text": "style=\"color: red;\"",
				"name": "mw-table-caption"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "caption3",
				"name": "mw-table-caption"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Multi-line captions in tables",
		"wikitext": "{|\n|+line 1 of caption\nline 2 of caption\n|data\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|+",
				"name": "typeOperator"
			},
			{
				"text": "line 1 of caption",
				"name": "mw-table-caption"
			},
			{
				"text": "line 2 of caption",
				"name": "mw-table-caption"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Table td-cell syntax variations",
		"wikitext": "{|\n|foo bar foo|baz\n|foo bar foo||baz\n|style='color:red;'|baz\n|style='color:red;'||baz\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Simple table",
		"wikitext": "{|\n|1||2\n|-\n|3||4\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Row-syntax table cells require that the row start with a table cell",
		"wikitext": "{|\n|a\nb||c\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Simple table but with multiple dashes for row wikitext",
		"wikitext": "{|\n|foo\n|-----\n|bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "----",
				"name": "definitionOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Multiplication table",
		"wikitext": "{| border=\"1\" cellpadding=\"2\"\n|+Multiplication table\n|-\n!&times;!!1!!2!!3\n|-\n!1\n|1||2||3\n|-\n!2\n|2||4||6\n|-\n!3\n|3||6||9\n|-\n!4\n|4||8||12\n|-\n!5\n|5||10||15\n|}",
		"nodes": [
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "border=",
				"name": "definitionOperator"
			},
			{
				"text": "\"1\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": " cellpadding=",
				"name": "definitionOperator"
			},
			{
				"text": "\"2\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": "|+",
				"name": "typeOperator"
			},
			{
				"text": "Multiplication table",
				"name": "mw-table-caption"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "&times;",
				"name": "mw-html-entity"
			},
			{
				"text": "!!",
				"name": "typeOperator"
			},
			{
				"text": "1",
				"name": "mw-strong"
			},
			{
				"text": "!!",
				"name": "typeOperator"
			},
			{
				"text": "2",
				"name": "mw-strong"
			},
			{
				"text": "!!",
				"name": "typeOperator"
			},
			{
				"text": "3",
				"name": "mw-strong"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "1",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "2",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "3",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "4",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "5",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Accept \"||\" in table headings",
		"wikitext": "{|\n!h1||h2\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "h1",
				"name": "mw-strong"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "h2",
				"name": "mw-strong"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Accept \"!!\" in table data",
		"wikitext": "{|\n|Foo!!||\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Accept \"||\" in indented table headings",
		"wikitext": ":{|\n!h1||h2\n|}",
		"nodes": [
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "h1",
				"name": "mw-strong"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "h2",
				"name": "mw-strong"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Accept \"!!\" in templates",
		"wikitext": "{|\n!a {{1x|b!!c}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "a ",
				"name": "mw-strong"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "b!!c",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Accept \"!!\" in table headings after newline",
		"wikitext": "{|\n!a\nb!!c\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "a",
				"name": "mw-strong"
			},
			{
				"text": "b!!c",
				"name": "mw-strong"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Accept \"!!\" in table data of mixed wikitext / html syntax",
		"wikitext": "{|\n!a\n<tr><td>b!!c</td></tr>\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "a",
				"name": "mw-strong"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "mw-strong"
			},
			{
				"text": "!!",
				"name": "typeOperator"
			},
			{
				"text": "c",
				"name": "mw-strong"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Accept empty attributes in td/th cells (td/th cells starting with leading ||)",
		"wikitext": "{|\n!|h1\n||a\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!|",
				"name": "typeOperator"
			},
			{
				"text": "h1",
				"name": "mw-strong"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Accept \"| !\" at start of line in tables (ignore !-attribute)",
		"wikitext": "{|\n|-\n|!style=\"color:red\"|bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Allow +/- in 2nd and later cells in a row, in 1st cell when td-attrs are present, or in 1st cell when there is a space between \"|\" and +/- ",
		"wikitext": "{|\n|-\n|style='color:red;'|+1\n|style='color:blue;'|-1\n|-\n|1||2||3\n|1||+2||-3\n|-\n| +1\n| -1\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Table rowspan",
		"wikitext": "{| border=1\n|Cell 1, row 1\n|rowspan=2|Cell 2, row 1 (and 2)\n|Cell 3, row 1\n|-\n|Cell 1, row 2\n|Cell 3, row 2\n|}",
		"nodes": [
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "border=",
				"name": "definitionOperator"
			},
			{
				"text": "1",
				"name": "mw-table-definition-value"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Nested table",
		"wikitext": "{| border=1\n| &alpha;\n|\n{| bgcolor=#ABCDEF border=2\n|nested\n|-\n|table\n|}\n|the original table again\n|}",
		"nodes": [
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "border=",
				"name": "definitionOperator"
			},
			{
				"text": "1",
				"name": "mw-table-definition-value"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "&alpha;",
				"name": "mw-html-entity"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "bgcolor=",
				"name": "definitionOperator"
			},
			{
				"text": "#ABCDEF",
				"name": "mw-table-definition-value"
			},
			{
				"text": " border=",
				"name": "definitionOperator"
			},
			{
				"text": "2",
				"name": "mw-table-definition-value"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Invalid attributes in table cell (T3830)",
		"wikitext": "{|\n|Cell:|broken\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Table cell attributes: Pipes protected by nowikis should be treated as a plain character",
		"wikitext": "{|\n|title=\"foo\" |bar\n|title=\"foo<nowiki>|</nowiki>\" |bar\n|title=\"foo<nowiki>|</nowiki>\" bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "|",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "|",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Table cell attributes: Pipes protected by nested nowikis should be treated as a plain character",
		"wikitext": "{|\n|<code><nowiki>{{ACB|PG}}</nowiki></code>\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "code",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "{{ACB|PG}}",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "code",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Table security: embedded pipes",
		"wikitext": "{|\n| |[ftp://|x||]\" onmouseover=\"alert(document.cookie)\">test",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "| |",
				"name": "typeOperator"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "ftp://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "|x||",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			}
		]
	},
	{
		"desc": "Element attributes with double ! should not be broken up by <th>",
		"wikitext": "{|\n!hi <div class=\"!!\">ha</div> ho\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "hi ",
				"name": "mw-strong"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "class=",
				"name": "attributeName"
			},
			{
				"text": "\"!!\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "ha",
				"name": "mw-strong"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ho",
				"name": "mw-strong"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "! and || in element attributes should not be parsed as <th>/<td>",
		"wikitext": "{|\n|<div style=\"color: red !important;\" data-contrived=\"put this here ||\">hi</div>\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div ",
				"name": "tagName"
			},
			{
				"text": "style=",
				"name": "attributeName"
			},
			{
				"text": "\"color: red !important;\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": " data-contrived=",
				"name": "attributeName"
			},
			{
				"text": "\"put this here ||\"",
				"name": "mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "! and || in td attributes should not be parsed as <th>/<td>",
		"wikitext": "{|\n|style=\"color: red !important;\" data-contrived=\"put this here ||\"|foo\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Invalid text in table attributes should be discarded",
		"wikitext": "{| <span>boo</span> style='border:1px solid black'\n|  <span>boo</span> style='color:blue'  |1\n|<span>boo</span> style='color:blue'|2\n|}",
		"nodes": [
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "boo",
				"name": "definitionOperator"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " style=",
				"name": "definitionOperator"
			},
			{
				"text": "'border:1px solid black'",
				"name": "mw-table-definition-value"
			},
			{
				"text": "|  ",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Invalid text in table attributes should be preserved by selective serializer",
		"wikitext": "{| <span>boo</span> style='border:1px solid black'\n|  <span>boo</span> style='color:blue'  | 1\n|<span>boo</span> style='color:blue'| 2\n|}",
		"nodes": [
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "boo",
				"name": "definitionOperator"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " style=",
				"name": "definitionOperator"
			},
			{
				"text": "'border:1px solid black'",
				"name": "mw-table-definition-value"
			},
			{
				"text": "|  ",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "1. Template-generated table cell attributes and cell content",
		"wikitext": "{|\n|{{table_attribs}}\n| {{table_attribs}}\n|| {{table_attribs_5}}\n| <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}\n|align=center {{table_attribs}}\n| <!--foo--> align=center <!--bar--> {{table_attribs}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_attribs",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_attribs",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_attribs_5",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "<!--foo-->",
				"name": "comment"
			},
			{
				"text": "<!--bar-->",
				"name": "comment"
			},
			{
				"text": "<!--baz-->",
				"name": "comment"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_attribs",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_attribs",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "<!--foo-->",
				"name": "comment"
			},
			{
				"text": "<!--bar-->",
				"name": "comment"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_attribs",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "2a. Template-generated table cell attributes and cell content",
		"wikitext": "{|\n|{{table_attribs_2}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_attribs_2",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "2b: Delete whitespace/comments if found in fosterable position while template-wrapping",
		"wikitext": "<table>\n<tr>\n<td>hi</td>\n{{1x|<td>ho</td>\n<!--comment-->\n<td>hi</td>}}\n<td>ho</td>\n</tr>\n</table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "ho",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "<!--comment-->",
				"name": "mw-template-ground comment"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "hi",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "td",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "3. Template-generated table cell attributes and cell content",
		"wikitext": "{|\n!align=center {{table_header_cells}}\n|-\n|align=center {{table_cells}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "align=center ",
				"name": "mw-strong"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_header_cells",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_cells",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "4. Template-generated table cell attributes and cell content inside a templated table",
		"wikitext": "{{tbl-start}}\n!align=center {{table_header_cells}}\n|-\n|align=center {{table_cells}}\n{{tbl-end}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "tbl-start",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_header_cells",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_cells",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "tbl-end",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Table with row followed by newlines and table heading",
		"wikitext": "{|\n|-\n\n!foo\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Table with empty line following the start tag",
		"wikitext": "{|\n\n|-\n|foo\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Table attributes with empty value",
		"wikitext": "{|\n| style=|hello\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Wikitext table with a lot of comments",
		"wikitext": "{|\n<!-- c0 -->\n|foo\n<!-- c1 -->\n|-<!-- c2 -->\n<!-- c3 -->\n|<!-- c4 -->\n<!-- c5 -->\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "<!-- c0 -->",
				"name": "comment"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<!-- c1 -->",
				"name": "comment"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "<!-- c2 -->",
				"name": "comment"
			},
			{
				"text": "<!-- c3 -->",
				"name": "comment"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<!-- c4 -->",
				"name": "comment"
			},
			{
				"text": "<!-- c5 -->",
				"name": "comment"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Wikitext table comments represented in parsoid dom",
		"wikitext": "{|<!--c1--><!--c2-->\n|-<!--c3-->\n|x\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "<!--c1--><!--c2-->",
				"name": "comment"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "<!--c3-->",
				"name": "comment"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Wikitext table with double-line table cell",
		"wikitext": "{|\n|a\nb\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Table cell with a single comment",
		"wikitext": "{|\n|<!-- c1 -->\n|a\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<!-- c1 -->",
				"name": "comment"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Table-cell after a comment-only-empty-line",
		"wikitext": "{|\n|a\n<!--c1-->\n<!--c2-->|b\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			},
			{
				"text": "<!--c2-->",
				"name": "comment"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Build table with {{!}}",
		"wikitext": "{{{!}} class=\"wikitable\"\n!header\n!second header\n{{!}}- style=\"color:red;\"\n{{!}}data{{!}}{{!}} style=\"color:red;\"{{!}}second data\n{{!}}data{{!}}| style=\"color:green;\"{{!}}third data\n{{!}}data|{{!}} style=\"color:blue;\"{{!}}fourth data\n{{!}}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Build table with pipe as data",
		"wikitext": "{| class=\"wikitable\"\n!header\n!second header\n|- style=\"color:red;\"\n|data|| style=\"color:red;\" |second data\n|-\n| style=\"color:red;\" |data with | || style=\"color:red;\" | second data with |\n|-\n||data with | |||second data with |\n|}",
		"nodes": [
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "class=",
				"name": "definitionOperator"
			},
			{
				"text": "\"wikitable\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "header",
				"name": "mw-strong"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "second header",
				"name": "mw-strong"
			},
			{
				"text": "|- ",
				"name": "typeOperator"
			},
			{
				"text": "style=",
				"name": "definitionOperator"
			},
			{
				"text": "\"color:red;\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|||",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Build table with wikilink",
		"wikitext": "{| class=\"wikitable\"\n!header||second header\n|- style=\"color:red;\"\n|data [[Main Page|linktext]]||second data [[Main Page|linktext]]\n|-\n|data||second data [[Main Page|link|text with pipe]]\n|}",
		"nodes": [
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "class=",
				"name": "definitionOperator"
			},
			{
				"text": "\"wikitable\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "header",
				"name": "mw-strong"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "second header",
				"name": "mw-strong"
			},
			{
				"text": "|- ",
				"name": "typeOperator"
			},
			{
				"text": "style=",
				"name": "definitionOperator"
			},
			{
				"text": "\"color:red;\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "linktext",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "linktext",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Main Page",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "link|text with pipe",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Wikitext table with html-syntax row",
		"wikitext": "{|\n|-\n<td>foo</td>\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Fostered content in tables: Plain text",
		"wikitext": "{|\n|-\na\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Fostered content in tables: Lists",
		"wikitext": "{|\n|-\n*a\n*b\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Template generated table cell with attributes",
		"wikitext": "{|\n|-\n{{table_attribs_4}} ||a||b\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_attribs_4",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Templated table cell with untemplated attributes: Cell combination tests",
		"wikitext": "{|\n|-\n!class=\"test\"{{table_cell_content|attr=! align=left}} /* th & th combine */\n|-\n|class=\"test\"{{table_cell_content}} /* td & td combine */\n|-\n!class=\"test\"{{table_cell_content}} /* th & td combine */\n|-\n|class=\"test\"{{table_cell_content|attr=! align=left}} /* td & th combine */\n|-\n|class=\"test\"{{table_cell_content|attr=style='color:red;'}}\n|-\n|class=\"test\"{{table_cell_content|cmt=<!--bar-->}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "class=\"test\"",
				"name": "mw-strong"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_cell_content",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "attr=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "! align=left",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": " /* th & th combine */",
				"name": "mw-strong"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_cell_content",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "class=\"test\"",
				"name": "mw-strong"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_cell_content",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": " /* th & td combine */",
				"name": "mw-strong"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_cell_content",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "attr=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "! align=left",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_cell_content",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "attr=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "style='color:red;'",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_cell_content",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "cmt=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "<!--bar-->",
				"name": "mw-template-ground comment"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "T343874: Templated table that has a templated cell with untemplated attributes",
		"wikitext": "{{tbl-start}}\n|-\n|class=\"test\"{{table_cell_content}}\n|-\n|class=\"test\"{{table_cell_content|attr=! align=left}}\n{{tbl-end}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "tbl-start",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_cell_content",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "table_cell_content",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "attr=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "! align=left",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "tbl-end",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Templated table cell with untemplated attributes: Regression tests",
		"wikitext": "{|\n|class=\"foo\"\n{{1x|1={{!}}bar}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Templated table cell with untemplated attributes: Unsupported (standalone mode) Scenarios",
		"wikitext": "{|\n|-\n|class=\"foo\"{{1x|1= {{!}}bar}}\n|-\n|class=\"foo\"{{1x|1=&nbsp;{{!}}bar}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": " ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "&nbsp;",
				"name": "mw-template-ground mw-html-entity"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Templated table cell with untemplated attributes",
		"wikitext": "{|\n|-\n|class=\"foo\"{{1x|1={{!}}title=\"fail\"{{!}}bar}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "title=\"fail\"",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Parsoid: Round-trip tables directly followed by content (T53219)",
		"wikitext": "{|\n|foo\n|} bar\n\n{|\n|baz\n|}<b>quux</b>",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "b",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Parsoid: Default to a newline after tables in new content (T53219)",
		"wikitext": "{|\n|foo\n|}\nbar\n{|\n|baz\n|}\n'''quux'''",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "quux",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Parsoid: Row-syntax table headings followed by comment & table cells",
		"wikitext": "{|\n!foo||bar\n<!-- foo -->  ||baz||quux\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "bar",
				"name": "mw-strong"
			},
			{
				"text": "<!-- foo -->",
				"name": "comment"
			},
			{
				"text": "  ",
				"name": "mw-strong"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "baz",
				"name": "mw-strong"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "quux",
				"name": "mw-strong"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Parsoid: Recover better from broken table attributes",
		"wikitext": "{| class=\"foo\n| class=\"bar\" |\nfoo\n|}",
		"nodes": [
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "class=",
				"name": "definitionOperator"
			},
			{
				"text": "\"foo",
				"name": "mw-table-definition-value"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Tables: Digest broken attributes on table and tr tag",
		"wikitext": "{| || |} ++\n|- || || ++ --\n|- > [\n|}",
		"nodes": [
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "|| |} ++",
				"name": "definitionOperator"
			},
			{
				"text": "|- ",
				"name": "typeOperator"
			},
			{
				"text": "|| || ++ --",
				"name": "definitionOperator"
			},
			{
				"text": "|- ",
				"name": "typeOperator"
			},
			{
				"text": "> [",
				"name": "definitionOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Table with missing opening <tr> tag",
		"wikitext": "<table>\n<td>foo</td>\n</tr>\n</table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</tr>",
				"name": "mw-error"
			},
			{
				"text": "</table>",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "1. Generate correct wikitext for tables with thead/tbody/tfoot",
		"wikitext": "{|\n|+Test\n!Month\n!Savings\n|-\n|January\n|$100\n|-\n|February\n|$80\n|-\n|Sum\n|$180\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|+",
				"name": "typeOperator"
			},
			{
				"text": "Test",
				"name": "mw-table-caption"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "Month",
				"name": "mw-strong"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "Savings",
				"name": "mw-strong"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "2. Generate correct wikitext for tables with thead/tbody/tfoot",
		"wikitext": "{|\n!heading\n|-\n|foo\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "heading",
				"name": "mw-strong"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Wikitext tables can be nested inside HTML tables",
		"wikitext": "<table>\n<tr><td>\n{|\n|foo\n|}\n</td></tr>\n</table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": "><",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "tr",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "T319143 - copy-pasting of cells, before",
		"wikitext": "{|\n|[[Eau]]\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Eau",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "T319143 - copy-pasting of cells, after",
		"wikitext": "{|\n|[[Eau]]\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Eau",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "T319143 - copy-pasting of cells, before multiple cells",
		"wikitext": "{|\n|[[Eau]]||[[Abc]]\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Eau",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Abc",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "T319143 - copy-pasting of cells, before multiple cells, without \"row\"",
		"wikitext": "{|\n|[[Eau]]||[[Abc]]\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Eau",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Abc",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "T319143 - copy-pasting of cells, between multiple cells",
		"wikitext": "{|\n|[[Eau]]||[[Abc]]\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Eau",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Abc",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "T319143 - copy-pasting of cells, between multiple cells, without \"row\"",
		"wikitext": "{|\n|[[Eau]]||[[Abc]]\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Eau",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Abc",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "T319143 - copy-pasting of cells, after multiple cells",
		"wikitext": "{|\n|[[Eau]]||[[Abc]]\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Eau",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Abc",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "T319143 - copy-pasting of cells, after multiple cells, without \"row\"",
		"wikitext": "{|\n|[[Eau]]||[[Abc]]\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Eau",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Abc",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Spec syntactic differences in parsing of !! compared to ||",
		"wikitext": "{|\n<!--cmt-->!!foo\n{{1x|!!foo}}\n<!--cmt-->!!foo!!bar\n{{1x|!!foo}}{{1x|!!bar}}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "<!--cmt-->",
				"name": "comment"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "!!foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<!--cmt-->",
				"name": "comment"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "!!foo",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "!!bar",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Multiline inline table line in file caption",
		"wikitext": "[[File:Foobar.jpg|thumb|\n{|\n|\nasdf\n|}\n]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "mw-link-ground typeOperator"
			},
			{
				"text": "asdf",
				"name": "mw-link-ground"
			},
			{
				"text": "|}",
				"name": "mw-link-ground null"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Table lines with multiple newlines, spaces, comments embedded in file caption",
		"wikitext": "[[File:Foobar.jpg|thumb|\n  <!--cmt-->   \n{|\n  \n |test\n   <!--cmt-->  \n|}]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "  ",
				"name": "mw-link-ground string"
			},
			{
				"text": "<!--cmt-->",
				"name": "mw-link-ground comment"
			},
			{
				"text": "   ",
				"name": "mw-link-ground string"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": " |",
				"name": "mw-link-ground typeOperator"
			},
			{
				"text": "test",
				"name": "mw-link-ground"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "  ",
				"name": "mw-link-ground"
			},
			{
				"text": "<!--cmt-->",
				"name": "mw-link-ground comment"
			},
			{
				"text": "  ",
				"name": "mw-link-ground"
			},
			{
				"text": "|}",
				"name": "mw-link-ground null"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "First line attributes should be handled by html2wt even without data-parsoid",
		"wikitext": "{|\n|- valign=\"top\"\n|Bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|- ",
				"name": "typeOperator"
			},
			{
				"text": "valign=",
				"name": "definitionOperator"
			},
			{
				"text": "\"top\"",
				"name": "mw-table-definition-value"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Don't apply complex line-splitting heuristics in AttributeExpander for non-<table> tokens",
		"wikitext": "{{1x<invalid>\n|{{2x<invalid>y}}|\n}}\n\n{{1x<invalid>\n|{{2x<invalid>\ny}}|\n}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x<invalid>",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "2x<invalid>y",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x<invalid>",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "2x<invalid>",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "y",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "Autoinserted tr in html table",
		"wikitext": "<table>\n<td>a</td>\n</table>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "td",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "table",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "AttributeExpander regression test: Class attributes should be properly applied",
		"wikitext": "{| {{1x|1=class=\"foo {{{class}}} <!--x--> bar\" style=\"font-size: 95%;\"}}\n|foo\n|}",
		"nodes": [
			{
				"text": "{| ",
				"name": "null"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "class=\"foo ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{{",
				"name": "mw-template-ground brace"
			},
			{
				"text": "class",
				"name": "mw-template-ground variableName"
			},
			{
				"text": "}}}",
				"name": "mw-template-ground brace"
			},
			{
				"text": " ",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "<!--x-->",
				"name": "mw-template-ground comment"
			},
			{
				"text": " bar\" style=\"font-size: 95%;\"",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Exclamation points in wikilink content in table precedence",
		"wikitext": "{|\n![[Foo|Bar!!]]\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Bar!!",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Multi-line transclusions should not interrupt table-cell parsing in the same row",
		"wikitext": "{|\n! class=\"c1\" |Col 1.1!! class=\"c2\" |{{1x|\n1=Col 1.2}}!! class=\"c3\" |Col 1.3!! class=\"c4\" |Col 1.4\n! class=\"d1\" |Col 2.1!! class=\"d2\" |{{1x|\n1=Col 2.2}}!! class=\"d3\" |Col 2.3! abcd!! class=\"d4\" |Col 2.4\n| class=\"e1\" |Col 3.1|| class=\"e2\" |{{1x|\n1=Col 3.2}}|| class=\"e3\" |Col 3.3| abcd|| class=\"e4\" |Col 3.4\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "! ",
				"name": "typeOperator"
			},
			{
				"text": "class=\"c1\" ",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "Col 1.1",
				"name": "mw-strong"
			},
			{
				"text": "!!",
				"name": "typeOperator"
			},
			{
				"text": " class=\"c2\" ",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "Col 1.2",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "!!",
				"name": "typeOperator"
			},
			{
				"text": " class=\"c3\" ",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "Col 1.3",
				"name": "mw-strong"
			},
			{
				"text": "!!",
				"name": "typeOperator"
			},
			{
				"text": " class=\"c4\" ",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "Col 1.4",
				"name": "mw-strong"
			},
			{
				"text": "! ",
				"name": "typeOperator"
			},
			{
				"text": "class=\"d1\" ",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "Col 2.1",
				"name": "mw-strong"
			},
			{
				"text": "!!",
				"name": "typeOperator"
			},
			{
				"text": " class=\"d2\" ",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "Col 2.2",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "!!",
				"name": "typeOperator"
			},
			{
				"text": " class=\"d3\" ",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "Col 2.3! abcd",
				"name": "mw-strong"
			},
			{
				"text": "!!",
				"name": "typeOperator"
			},
			{
				"text": " class=\"d4\" ",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "Col 2.4",
				"name": "mw-strong"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "Col 3.2",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Row syntax td starting with closing curly brace",
		"wikitext": "{|\n|a||}||b\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "#translation as magic word for valid language code",
		"wikitext": "{{#translation:}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#translation",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#translation as magic word for source page",
		"wikitext": "{{#translation:}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#translation",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "#translation as magic word for invalid language code",
		"wikitext": "{{#translation:}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#translation",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "Old tvar syntax should not break too hard.",
		"wikitext": "<translate><tvar|plop>pouet</></translate>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "translate",
				"name": "mw-exttag-name mw-ext-translate"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "<tvar|plop>pouet</>",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "translate",
				"name": "mw-exttag-name mw-ext-translate"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-translate"
			}
		]
	},
	{
		"desc": "Old tvar syntax should not pull content in cell attributes",
		"wikitext": "{|\n|<translate>hello <tvar|var>variable</></translate>\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "translate",
				"name": "mw-exttag-name mw-ext-translate"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "hello <tvar|var>variable</>",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "translate",
				"name": "mw-exttag-name mw-ext-translate"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Annotation markers starting lines should neither insert pre nor merge ranges",
		"wikitext": "<translate><!--T:1--> translate 1</translate>\n<translate><!--T:2--> translate 2</translate>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "translate",
				"name": "mw-exttag-name mw-ext-translate"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "<!--T:1--> translate 1",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "translate",
				"name": "mw-exttag-name mw-ext-translate"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "translate",
				"name": "mw-exttag-name mw-ext-translate"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "<!--T:2--> translate 2",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "translate",
				"name": "mw-exttag-name mw-ext-translate"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-translate"
			}
		]
	},
	{
		"desc": "tvar in a template should get stripped",
		"wikitext": "<translate>{{1x|<tvar|var>hello</>}}</translate>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "translate",
				"name": "mw-exttag-name mw-ext-translate"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "{{1x|<tvar|var>hello</>}}",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "translate",
				"name": "mw-exttag-name mw-ext-translate"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-translate"
			}
		]
	},
	{
		"desc": "tvar with old syntax containing template markup should not break",
		"wikitext": "<translate>hello <tvar|code>{{1x|</>world<tvar|code2>}}</></translate>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "translate",
				"name": "mw-exttag-name mw-ext-translate"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "hello <tvar|code>{{1x|</>world<tvar|code2>}}</>",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-translate"
			},
			{
				"text": "translate",
				"name": "mw-exttag-name mw-ext-translate"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-translate"
			}
		]
	},
	{
		"desc": "Legacy fragment encoding",
		"wikitext": "<ref name=\"nature%20phylo\">A</ref>\n<ref name=\"Mininova%2E26%2E11%2E2009\">B</ref>\n<ref name=\"%c8%98tiri_2019\">C</ref>\n<ref name=\"play%21\">D</ref>\n<ref name=\"Terry+O%26rsquo%3BN…</ref\">E</ref>\n<ref name=\"9&nbsp;pm\">F</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"nature%20phylo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "A",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"Mininova%2E26%2E11%2E2009\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "B",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"%c8%98tiri_2019\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "C",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"play%21\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "D",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"Terry+O%26rsquo%3BN…</ref\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "E",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"9&nbsp;pm\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "F",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T298278: Collection of test cases in HTML5 mode",
		"wikitext": "<ref name=\"nature%20phylo\">A</ref>\n<ref name=\"Mininova%2E26%2E11%2E2009\">B</ref>\n<ref name=\"%c8%98tiri_2019\">C</ref>\n<ref name=\"play%21\">D</ref>\n<ref name=\"Terry+O%26rsquo%3BN…</ref\">E</ref>\n<ref name=\"9&nbsp;pm\">F</ref>\n<references />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"nature%20phylo\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "A",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"Mininova%2E26%2E11%2E2009\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "B",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"%c8%98tiri_2019\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "C",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"play%21\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "D",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"Terry+O%26rsquo%3BN…</ref\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "E",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"9&nbsp;pm\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "F",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "URL encoded strings accidentally copy-pasted in legacy mode",
		"wikitext": "<ref name=\"n%25%32%30n\" group=\"g%25%32%30g\">A</ref>\n<references group=\"g%25%32%30g\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"n%25%32%30n\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"g%25%32%30g\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "A",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"g%25%32%30g\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "T298278: URL encoded strings accidentally copy-pasted in HTML5 mode",
		"wikitext": "<ref name=\"n%25%32%30n\" group=\"g%25%32%30g\">A</ref>\n<references group=\"g%25%32%30g\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"n%25%32%30n\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"g%25%32%30g\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "A",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"g%25%32%30g\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Multiple, partly encoded spaces in legacy mode",
		"wikitext": "<ref name=\"a_ %20a\" group=\"b_ %20b\">A</ref>\n<references group=\"b_ %20b\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a_ %20a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b_ %20b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "A",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"b_ %20b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "Multiple, partly encoded spaces in HTML5 mode",
		"wikitext": "<ref name=\"a_ %20a\" group=\"b_ %20b\">A</ref>\n<references group=\"b_ %20b\" />",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref ",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": "name=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"a_ %20a\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " group=",
				"name": "mw-exttag-attribute mw-ext-ref"
			},
			{
				"text": "\"b_ %20b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "A",
				"name": "mw-tag-ref"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "ref",
				"name": "mw-exttag-name mw-ext-ref"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-ref"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-references"
			},
			{
				"text": "references ",
				"name": "mw-exttag-name mw-ext-references"
			},
			{
				"text": "group=",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "\"b_ %20b\"",
				"name": "mw-exttag-attribute-value"
			},
			{
				"text": " ",
				"name": "mw-exttag-attribute mw-ext-references"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-references"
			}
		]
	},
	{
		"desc": "WikiHiero - basics",
		"wikitext": "<hiero>A1 - B2 D3</hiero>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "A1 - B2 D3",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			}
		]
	},
	{
		"desc": "WikiHiero - XSS protection",
		"wikitext": "<hiero><script>alert(\"FAIL\")</script></hiero>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "<script>alert(\"FAIL\")</script>",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			}
		]
	},
	{
		"desc": "WikiHiero - prefabs",
		"wikitext": "<hiero>a:A1</hiero>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "a:A1",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			}
		]
	},
	{
		"desc": "WikiHiero - Horus name",
		"wikitext": "<hiero><h1 A h1></hiero>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "<h1 A h1>",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			}
		]
	},
	{
		"desc": "WikiHiero - cartouche",
		"wikitext": "<hiero>< A ></hiero>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "< A >",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			}
		]
	},
	{
		"desc": "WikiHiero - EOL",
		"wikitext": "<hiero>A1!B1 ! C1</hiero>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "A1!B1 ! C1",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			}
		]
	},
	{
		"desc": "WikiHiero - complex text with EOL",
		"wikitext": "<hiero>M23-X1:R4-X8-Q2:D4-W17-R14-G4-R8-O29:V30-U23 !\nN26-D58-O49:Z1-F13:N31-V30:N16:N21*Z1-D45:N25</hiero>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "M23-X1:R4-X8-Q2:D4-W17-R14-G4-R8-O29:V30-U23 !",
				"name": "mw-exttag"
			},
			{
				"text": "N26-D58-O49:Z1-F13:N31-V30:N16:N21*Z1-D45:N25",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			}
		]
	},
	{
		"desc": "WikiHiero - image mirroring",
		"wikitext": "<hiero>A1\\-A1</hiero>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "A1\\-A1",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			}
		]
	},
	{
		"desc": "WikiHiero - void blocks",
		"wikitext": "<hiero>A1..B1.C1</hiero>\n<hiero>A1 .. B1 . C1</hiero>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "A1..B1.C1",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "A1 .. B1 . C1",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			}
		]
	},
	{
		"desc": "WikiHiero - HTML comments",
		"wikitext": "<hiero>A1<!-- B1 --> C1 D<!--\nfooooo -->1</hiero>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "A1<!-- B1 --> C1 D<!--",
				"name": "mw-exttag"
			},
			{
				"text": "fooooo -->1",
				"name": "mw-exttag"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-hiero"
			},
			{
				"text": "hiero",
				"name": "mw-exttag-name mw-ext-hiero"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-hiero"
			}
		]
	},
	{
		"desc": "Headings: 0. Unnested",
		"wikitext": "<nowiki>=foo=</nowiki>\n\n<nowiki/>=foo=\n<!--cmt-->\n<nowiki>=foo=</nowiki>\n\n=foo''a''<nowiki>=</nowiki>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=foo=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<!--cmt-->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=foo=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "a",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Headings: 1. Nested inside html",
		"wikitext": "= =foo= =\n\n== =foo= ==\n\n=== =foo= ===\n\n=<nowiki>=foo=</nowiki>=\n==<nowiki>=foo=</nowiki>==\n===<nowiki>=foo=</nowiki>===\n====<nowiki>=foo=</nowiki>====\n=====<nowiki>=foo=</nowiki>=====\n======<nowiki>=foo=</nowiki>======",
		"nodes": [
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": " =foo= ",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " =foo= ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": " =foo= ",
				"name": "mw-section"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=foo=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=foo=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "===",
				"name": "heading heading3"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=foo=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "===",
				"name": "heading"
			},
			{
				"text": "====",
				"name": "heading heading4"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=foo=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "====",
				"name": "heading"
			},
			{
				"text": "=====",
				"name": "heading heading5"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=foo=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=====",
				"name": "heading"
			},
			{
				"text": "======",
				"name": "heading heading6"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=foo=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "======",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar",
		"wikitext": "= foo =\n<nowiki>*</nowiki>bar\n\n= foo =\n=bar\n\n= foo =\n<nowiki>=bar=</nowiki>",
		"nodes": [
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": " foo ",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "*",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": " foo ",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": " foo ",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=bar=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Headings: 3. Nested inside html with wikitext split by html tags",
		"wikitext": "= ='''bold'''foo= =",
		"nodes": [
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": " ='''bold'''foo= ",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Headings: 4a. No escaping needed (testing just h1 and h2)",
		"wikitext": "= =foo =\n\n= foo= =\n\n= =foo= =\n\n= =foo= bar =\n\n== =foo ==\n\n== foo= ==\n\n= = =\n\n= ''=''foo= =",
		"nodes": [
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": " =foo ",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": " foo= ",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": " =foo= ",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": " =foo= bar ",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " =foo ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " foo= ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": " = ",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": " ''=''foo= ",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Headings: 4b. No escaping needed (inside p-tags)",
		"wikitext": "=foo= x\n=foo= <s></s>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Headings: 4c. Short headings (1)",
		"wikitext": "<nowiki>===</nowiki>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "===",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Headings: 4d. Short headings (2)",
		"wikitext": "=\n==\n===\n====\n=====",
		"nodes": [
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "=",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": "==",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "=",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Headings: 6a. Heading chars in SOL context (with trailing spaces)",
		"wikitext": "<nowiki>=a=</nowiki>\n\n<nowiki>=a=</nowiki> \n\n<nowiki>=a=</nowiki>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=a=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=a=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=a=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Headings: 6b. Heading chars in SOL context (with trailing newlines)",
		"wikitext": "<nowiki>=a=</nowiki>\nb\n\n<nowiki>=a=</nowiki> \nb\n\n<nowiki>=a=</nowiki>\t\nb",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=a=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=a=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=a=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Headings: 6c. Heading chars in SOL context (leading newline break)",
		"wikitext": "a\n<nowiki>=b=</nowiki>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=b=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Headings: 6d. Heading chars in SOL context (with interspersed comments)",
		"wikitext": "<!--c0--><nowiki>=a=</nowiki>\n\n<!--c1--><nowiki>=a=</nowiki> <!--c2-->\t <!--c3-->",
		"nodes": [
			{
				"text": "<!--c0-->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=a=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<!--c1-->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=a=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<!--c2-->",
				"name": "comment"
			},
			{
				"text": "<!--c3-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "Headings: 6d. Heading chars in SOL context (No escaping needed)",
		"wikitext": "=a=<div>b</div>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "Headings: 7. Insert a newline between new content and headings",
		"wikitext": "== NEW ==\nnew\n\n==A==\na",
		"nodes": [
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": " NEW ",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			},
			{
				"text": "==",
				"name": "heading heading2"
			},
			{
				"text": "A",
				"name": "mw-section"
			},
			{
				"text": "==",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Headings: Used as horizontal rule",
		"wikitext": "===============",
		"nodes": [
			{
				"text": "======",
				"name": "heading heading6"
			},
			{
				"text": "===",
				"name": "mw-section"
			},
			{
				"text": "======",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Lists: 0. Outside nests",
		"wikitext": "<nowiki>*</nowiki>foo\n\n<nowiki>#</nowiki>foo\n\n<nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "*",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "#",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": ";",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": ":",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Lists: 1. Nested inside html (No unnecessary escapes)",
		"wikitext": "* *foo\n* #foo\n* :foo\n* ;foo\n*<nowiki>*foo</nowiki>\n*<nowiki>#foo</nowiki>\n*<nowiki>:foo</nowiki>\n*<nowiki>;foo</nowiki>\n\n# *foo\n# #foo\n# :foo\n# ;foo\n#<nowiki>*foo</nowiki>\n#<nowiki>#foo</nowiki>\n#<nowiki>:foo</nowiki>\n#<nowiki>;foo</nowiki>",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "*foo",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "#foo",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": ":foo",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": ";foo",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "#",
				"name": "list"
			},
			{
				"text": "#",
				"name": "list"
			},
			{
				"text": "#",
				"name": "list"
			},
			{
				"text": "#",
				"name": "list"
			},
			{
				"text": "#",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "*foo",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "#",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "#foo",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "#",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": ":foo",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "#",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": ";foo",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Lists: 2. Inside definition lists",
		"wikitext": "; ;foo\n\n; <nowiki>:foo</nowiki>\n\n; <nowiki>:foo</nowiki>\n: bar\n\n: :foo",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": " ;foo",
				"name": "mw-strong"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": " ",
				"name": "mw-strong"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": ":foo",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": " ",
				"name": "mw-strong"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": ":foo",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": ":",
				"name": "list"
			},
			{
				"text": ":",
				"name": "list"
			}
		]
	},
	{
		"desc": "Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped",
		"wikitext": "* *foo*bar\n*<nowiki>*foo</nowiki>''it''*bar",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "*foo",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "it",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Lists: 4. No escapes needed",
		"wikitext": "*foo*bar\n\n*''foo''*bar\n\n*[[Foo]]: bar\n\n*[[Foo]]*bar",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Lists: 5. No unnecessary escapes",
		"wikitext": "* bar <span><nowiki>[[foo]]</nowiki></span>\n\n* =bar <span><nowiki>[[foo]]</nowiki></span>\n\n* [[bar <span><nowiki>[[foo]]</nowiki></span>\n\n* ]]bar <span><nowiki>[[foo]]</nowiki></span>\n\n* =bar <span>foo]]</span>=\n\n* <s></s>: a\n\n* ''* foo''",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[foo]]",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[foo]]",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "bar <span><nowiki>[[foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "</nowiki",
				"name": "mw-error"
			},
			{
				"text": "</span>",
				"name": "mw-error"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[foo]]",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": "></",
				"name": "angleBracket"
			},
			{
				"text": "s",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "* foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "Lists: 6. Escape bullets in SOL position",
		"wikitext": "<!--cmt--><nowiki>*</nowiki>foo",
		"nodes": [
			{
				"text": "<!--cmt-->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "*",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Lists: 7. Escape bullets in a multi-line context",
		"wikitext": "a\n<nowiki>*</nowiki>b",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "*",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Lists: 8. Escape colons only if not present in tags",
		"wikitext": "; <nowiki>a:b</nowiki>''c:d''",
		"nodes": [
			{
				"text": ";",
				"name": "list"
			},
			{
				"text": " ",
				"name": "mw-strong"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "a:b",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "c",
				"name": "mw-strong mw-em"
			},
			{
				"text": ":",
				"name": "operatorKeyword"
			},
			{
				"text": "d",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "HRs: 1. Single line",
		"wikitext": "----<nowiki>----</nowiki>\n----=foo=\n----*foo",
		"nodes": [
			{
				"text": "----",
				"name": "contentSeparator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "----",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "----",
				"name": "contentSeparator"
			},
			{
				"text": "----",
				"name": "contentSeparator"
			}
		]
	},
	{
		"desc": "Tables: 1a. Simple example",
		"wikitext": "<nowiki>{|</nowiki>\n|}",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "{|",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Tables: 1b. No escaping needed",
		"wikitext": "!foo",
		"nodes": []
	},
	{
		"desc": "Tables: 1c. No escaping needed",
		"wikitext": "|foo",
		"nodes": []
	},
	{
		"desc": "Tables: 1d. No escaping needed",
		"wikitext": "|}foo",
		"nodes": []
	},
	{
		"desc": "Tables: 2a. Nested in td",
		"wikitext": "{|\n|<nowiki>foo|bar</nowiki>\n|-\n|x<div><nowiki>a|b</nowiki></div>\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "foo|bar",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "a|b",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Tables: 2b. Nested in td",
		"wikitext": "{|\n|<nowiki>foo||bar</nowiki>\n|a''<nowiki>b||c</nowiki>''\n|a''<div><nowiki>b||c</nowiki></div>''\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "foo||bar",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "b||c",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "b||c",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Tables: 2c. Nested in td -- no escaping needed",
		"wikitext": "{|\n|foo!!bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Tables: 3a. Nested in th",
		"wikitext": "{|\n!foo!bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "foo!bar",
				"name": "mw-strong"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Tables: 3b. Nested in th",
		"wikitext": "{|\n!<nowiki>foo!!bar</nowiki>\n!''<nowiki>foo|bar</nowiki>''\n!''<nowiki>foo!!bar</nowiki>''\n!''<span><nowiki>foo!!bar</nowiki></span>''\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "foo!!bar",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "foo|bar",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "foo!!bar",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "foo!!bar",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Tables: 3c. Nested in th",
		"wikitext": "{|\n!<nowiki>foo||bar</nowiki>\n!<nowiki>foo||bar</nowiki>\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "foo||bar",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "foo||bar",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Tables: 4a. Escape -",
		"wikitext": "{|\n!-bar\n|-\n| -bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "-bar",
				"name": "mw-strong"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Tables: 4b. Escape +",
		"wikitext": "{|\n!+bar\n|-\n| +bar\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "!",
				"name": "typeOperator"
			},
			{
				"text": "+bar",
				"name": "mw-strong"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Tables: 4c. No escaping needed",
		"wikitext": "{|\n|foo-bar\n|foo+bar\n|-\n|''foo''-bar\n|''foo''+bar\n|-\n|foo\nbar|baz\n+bar\n-bar\n|-\n|x\n<div>a|b</div>\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Tables: 4d. No escaping needed",
		"wikitext": "{|\n|[[Foo]]-bar\n||+1\n||-2\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Tables: 4e. Escape }",
		"wikitext": "{|\n| }\n|-\n|x||}\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|-",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Tables: 5. Empty table cells should get whitespace to avoid need for nowikis",
		"wikitext": "{|\n| || align=\"center\" | ||\n|}\n\n{|\n|\n| align=\"center\" |\n|\n|}\n\n{|\n| {{!}}{{!}} align=\"center\" | ||\n|}\n\n{|\n! !! align=\"center\" | !!\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "| ||",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": "||",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			},
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "! !!",
				"name": "typeOperator"
			},
			{
				"text": " align=\"center\" ",
				"name": "mw-strong"
			},
			{
				"text": "|",
				"name": "typeOperator"
			},
			{
				"text": " ",
				"name": "mw-strong"
			},
			{
				"text": "!!",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "T97430: Don't emit empty nowiki pairs around marker meta tags",
		"wikitext": "<nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs\n|** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "*",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Unclosed xmlish element in table line shouldn't eat end delimiters",
		"wikitext": "{|\n| <foo\n| bar>\n|}",
		"nodes": [
			{
				"text": "{|",
				"name": "null"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "| ",
				"name": "typeOperator"
			},
			{
				"text": "|}",
				"name": "null"
			}
		]
	},
	{
		"desc": "Links 1. WikiLinks: No escapes needed",
		"wikitext": "[[Foo|Foo''boo'']]\n[[Foo|[Foobar]]]\n[[Foo|x [Foobar] x]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground string"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "boo",
				"name": "mw-link-ground string mw-em"
			},
			{
				"text": "''",
				"name": "mw-link-ground string character"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[Foobar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "x [Foobar] x",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Links 2. WikiLinks: Escapes needed",
		"wikitext": "[[Foo|<nowiki>Foobar]</nowiki>]]\n[[Foo|x <nowiki>[http://google.com g]</nowiki> x]]\n[[Foo|<nowiki>[[Bar]]</nowiki>]]\n[[Foo|<nowiki>x [[Bar]] x</nowiki>]]\n[[Foo||Bar]]\n[[Foo|<nowiki>]]bar</nowiki>]]\n[[Foo|<nowiki>[[bar</nowiki>]]\n[[Foo|<nowiki>x [[ y</nowiki>]]\n[[Foo|<nowiki>x ]] y</nowiki>]]\n[[Foo|<nowiki>x ]] y [[ z</nowiki>]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "Foobar]",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "x ",
				"name": "mw-link-ground string"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[http://google.com g]",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": " x",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[Bar]]",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "x [[Bar]] x",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "|Bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]]bar",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[bar",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "x [[ y",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "x ]] y",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "x ]] y [[ z",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Links 3. WikiLinks: No escapes needed",
		"wikitext": "[[Foo|[Foobar]]\n[[Foo|foo|bar]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "[Foobar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "foo|bar",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Links 4. ExtLinks: Escapes needed",
		"wikitext": "[http://google.com <nowiki>[google]</nowiki>]\n[http://google.com <nowiki>google]</nowiki>]\n[http://google.com <nowiki>goog] le</nowiki>]\n\n<nowiki>[http://google.com]</nowiki>\n\n<nowiki>[http://google.com google]</nowiki>\n\n[http://google.com<nowiki>]</nowiki>\n\n[{{1x|http://google.com}}<nowiki>]</nowiki>",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "google.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[google]",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "google.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "google]",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "google.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "goog] le",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[http://google.com]",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[http://google.com google]",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "google.com<nowiki>",
				"name": "mw-link-ground url"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "</nowiki",
				"name": "mw-error"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "http://google.com",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Links 5. ExtLinks: No escapes needed",
		"wikitext": "[http://google.com [google]\n\n[[http://google.com]]",
		"nodes": [
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "http://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "google.com",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "[google",
				"name": "mw-link-ground labelName"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "http://google.com",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)",
		"wikitext": "x<nowiki/>http://example.com<nowiki/>y\nhttp://example.com<nowiki/>?x\nhttp://example.com<nowiki/>&x\nhttp://example.com<nowiki/>'x\nhttp://example.com<nowiki/>,x\nhttp://example.com<nowiki/>.x\nhttp://example.com<nowiki/>;x\nhttp://example.com<nowiki/>:x\nhttp://example.com<nowiki/>;x\nhttp://example.com<nowiki/>!x\nhttp://example.com<nowiki/>=x\nhttp://example.com<nowiki/>(x)\nhttp://example.com(x<nowiki/>)",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com(x",
				"name": "mw-free-extlink"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)",
		"wikitext": "x\nhttp://example.com\ny\n\"http://example.com\"\n(http://example.com)\n(http://example.com) foo\nhttp://example.com,\nhttp://example.com, foo",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			},
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)",
		"wikitext": "http://example.com.,;:!?\\\n-http://example.com:",
		"nodes": [
			{
				"text": "http://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com.,;:!?\\",
				"name": "mw-free-extlink"
			}
		]
	},
	{
		"desc": "Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)",
		"wikitext": "RFC 123<nowiki/>4\nRFC 123<nowiki/>y\nX<nowiki/>RFC 123<nowiki/>y",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)",
		"wikitext": "RFC 123?foo\nRFC 123&foo\n-RFC 123-",
		"nodes": []
	},
	{
		"desc": "Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)",
		"wikitext": "PMID 123<nowiki/>4\nPMID 123<nowiki/>y\nX<nowiki/>PMID 123<nowiki/>y",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)",
		"wikitext": "PMID 123?foo\nPMID 123&foo\n-PMID 123-",
		"nodes": []
	},
	{
		"desc": "Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)",
		"wikitext": "ISBN 1234567890<nowiki/>1\nISBN 1234567890<nowiki/>x\na<nowiki/>ISBN 1234567890<nowiki/>b",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)",
		"wikitext": "-ISBN 1234567890's",
		"nodes": []
	},
	{
		"desc": "Links 14. Protect link-like plain text. (Parsoid bug T78425)",
		"wikitext": "this is not a link: <nowiki>http://example.com</nowiki>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "http://example.com",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Links 18. Square brackets in URL fragments (T404823)",
		"wikitext": "[[Foo#%5Bon_hold%5D_stuff]]\n\n[[Foo#%5Bon_hold%5D_stuff]]\n\n[[Foo#a%7Cb]]\n\n[https://example.com/foo#&#x5B;on_hold&#x5D;_stuff <nowiki>Foo#[on_hold]_stuff</nowiki>]\n\nhttps://example.com/foo#&#x5B;on_hold&#x5D;_stuff\n\n[[Foo#&amp;%2358;stuff|<nowiki>Foo#[on_hold]_stuff</nowiki>]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "%5Bon_hold%5D_stuff",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "%5Bon_hold%5D_stuff",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "a%7Cb",
				"name": "mw-link-ground className"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "[",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "https://",
				"name": "mw-link-ground namespace"
			},
			{
				"text": "example.com/foo#",
				"name": "mw-link-ground url"
			},
			{
				"text": "&#x5B;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "on_hold",
				"name": "mw-link-ground url"
			},
			{
				"text": "&#x5D;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "_stuff",
				"name": "mw-link-ground url"
			},
			{
				"text": " ",
				"name": "mw-link-ground"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "Foo#[on_hold]_stuff",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]",
				"name": "mw-link-ground modifier"
			},
			{
				"text": "https://",
				"name": "mw-free-extlink-protocol"
			},
			{
				"text": "example.com/foo#&#x5B;on_hold&#x5D;_stuff",
				"name": "mw-free-extlink"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "&amp;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "%2358;stuff",
				"name": "mw-link-ground className"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "Foo#[on_hold]_stuff",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "Links 18b. Verify that wikitext generated by last Links 18 example\nround-trips to equivalent html",
		"wikitext": "[[Foo#&amp;%2358;stuff|<nowiki>Foo#[on_hold]_stuff</nowiki>]]",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "#",
				"name": "mw-link-ground mw-link"
			},
			{
				"text": "&amp;",
				"name": "mw-link-ground mw-html-entity"
			},
			{
				"text": "%2358;stuff",
				"name": "mw-link-ground className"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "<",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "Foo#[on_hold]_stuff",
				"name": "mw-link-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-link-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-link-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "1a. Quotes inside <b> and <i>",
		"wikitext": "''<nowiki/>'foo'''\n''<nowiki>''foo''</nowiki>''\n''<nowiki>'''foo'''</nowiki>''\n''foo''<nowiki/>'s\n'''<nowiki/>'foo''''\n'''<nowiki>''foo''</nowiki>'''\n'''<nowiki>'''foo'''</nowiki>'''\n'''foo'<nowiki/>''bar'<nowiki/>''baz'''\n'''foo'''<nowiki/>'s\n'''foo''\n''foo''<nowiki/>'\n''foo'''<nowiki/>'\n'''foo''<nowiki/>'\n''''foo'''\n'''foo'''<nowiki/>'\n''''foo'''<nowiki/>'\n''fools'<span> errand</span>''\n''<span>fool</span>'s errand''\n'<nowiki/>''foo'' bar '''baz''\na|!*#-:;+-~[]{}b'''x''",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "'foo'",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''foo''",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "'''foo'''",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "'foo'",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''foo''",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "'''foo'''",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo'",
				"name": "mw-strong"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "bar'",
				"name": "mw-strong mw-em"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "baz",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo'",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "fools'",
				"name": "mw-em"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " errand",
				"name": "mw-em"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "fool",
				"name": "mw-em"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "'s errand",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "foo",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "baz",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "x",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "2. Link fragments separated by <i> and <b> tags",
		"wikitext": "[[''foo''<nowiki>hello]]</nowiki>\n\n[['''foo'''<nowiki>hello]]</nowiki>",
		"nodes": [
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "''foo''<nowiki>hello",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "</nowiki",
				"name": "mw-error"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "'''foo'''<nowiki>hello",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "</nowiki",
				"name": "mw-error"
			}
		]
	},
	{
		"desc": "3. Link fragments inside <i> and <b>",
		"wikitext": "''[[foo''<nowiki>]]</nowiki>\n\n'''[[foo'''<nowiki>]]</nowiki>",
		"nodes": [
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "foo''<nowiki>",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-em"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "</nowiki",
				"name": "mw-error"
			},
			{
				"text": ">",
				"name": "mw-em"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "foo'''<nowiki>",
				"name": "mw-link-ground mw-link-pagename mw-pagename mw-strong"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "</nowiki",
				"name": "mw-error"
			},
			{
				"text": ">",
				"name": "mw-strong"
			}
		]
	},
	{
		"desc": "4. No escaping needed",
		"wikitext": "'<span>''bar''</span>'\n'<span>'''bar'''</span>'\n'a:b'foo",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "bar",
				"name": "mw-em"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "bar",
				"name": "mw-strong"
			},
			{
				"text": "'''",
				"name": "character"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "1. No unnecessary escapes",
		"wikitext": "bar <span><nowiki>[[foo]]</nowiki></span>\n\n=bar <span><nowiki>[[foo]]</nowiki></span>\n\n[[bar <span><nowiki>[[foo]]</nowiki></span>\n\n]]bar <span><nowiki>[[foo]]</nowiki></span>\n\n=bar <span>foo]]</span><nowiki>=</nowiki>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[foo]]",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[foo]]",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "bar <span><nowiki>[[foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "</nowiki",
				"name": "mw-error"
			},
			{
				"text": "</span>",
				"name": "mw-error"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[foo]]",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "=",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "1. Leading whitespace in SOL context should be stripped",
		"wikitext": "a\n\na\n\n\ta(tab)\n\na\n<!--cmt-->\na\n\na\nb\n\na\n\tb\n\na\n\t b",
		"nodes": [
			{
				"text": "<!--cmt-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "3. Leading whitespace in indent-pre suppressing contexts should not be escaped",
		"wikitext": "<blockquote>\n a\n <span>b</span>\n c\n</blockquote>",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "span",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "</",
				"name": "angleBracket"
			},
			{
				"text": "blockquote",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			}
		]
	},
	{
		"desc": "4. Leading whitespace in indent-pre suppressing contexts should not be escaped",
		"wikitext": " [[File:Foobar.jpg|thumb|caption]]",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "File:Foobar.jpg",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "thumb",
				"name": "mw-link-ground mw-image-parameter"
			},
			{
				"text": "|",
				"name": "mw-link-ground operator"
			},
			{
				"text": "caption",
				"name": "mw-link-ground string"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			}
		]
	},
	{
		"desc": "5. Nowiki escaping should account for indent-pres",
		"wikitext": " ==foo==",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block",
		"wikitext": " * foo\n * bar",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup",
		"wikitext": "foo\n\n%foo\n\n<nowiki/>*foo\n\n<nowiki/>#foo\n\n<nowiki/>=foo=\n\n[[Category:Foo]]\n<nowiki/>*foo\n\n [[Category:Foo]]\n<nowiki>*</nowiki>foo\n\n<nowiki/><!--boo-->*foo\n\n<!--boo--><nowiki/>*foo\n\n<!--a--><!--b--><!--c--><!--d--><!--e-->foo\n\n<!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "[[",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "Category:Foo",
				"name": "mw-link-ground mw-link-pagename mw-pagename"
			},
			{
				"text": "]]",
				"name": "mw-link-ground squareBracket"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "*",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<!--boo-->",
				"name": "comment"
			},
			{
				"text": "<!--boo-->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<!--a--><!--b--><!--c--><!--d--><!--e-->",
				"name": "comment"
			},
			{
				"text": "<!--a-->",
				"name": "comment"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": "/>",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<!--b--><!--c--><!--d--><!--e-->",
				"name": "comment"
			}
		]
	},
	{
		"desc": "1. Valid behavior switches should be escaped",
		"wikitext": "<nowiki>__TOC__</nowiki>\n''<nowiki>__TOC__</nowiki>''",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "__TOC__",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "__TOC__",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "''",
				"name": "character"
			}
		]
	},
	{
		"desc": "2. Invalid behavior switches should not be escaped",
		"wikitext": "__TOO__\n__|__",
		"nodes": []
	},
	{
		"desc": "Behavior switches should be SOL-transparent",
		"wikitext": " __TOC__\n\n <!-- this one's bogus -->\n __TOO__\n\n __TOC__ foo\n\n__TOC__\n bar",
		"nodes": [
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "<!-- this one's bogus -->",
				"name": "comment"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			},
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": "__TOC__",
				"name": "controlKeyword"
			},
			{
				"text": " ",
				"name": "mw-skipformatting"
			}
		]
	},
	{
		"desc": "During serialization, normalize output when given a SOL-transparent prefix",
		"wikitext": "x\n\n__NOTOC__y\n\n__NOTOC__z\n\n__notoc__p",
		"nodes": [
			{
				"text": "__NOTOC__",
				"name": "controlKeyword"
			},
			{
				"text": "__NOTOC__",
				"name": "controlKeyword"
			},
			{
				"text": "__notoc__",
				"name": "controlKeyword"
			}
		]
	},
	{
		"desc": "1. a tags",
		"wikitext": "<a href=\"http://google.com\">google</a>",
		"nodes": []
	},
	{
		"desc": "2. other tags",
		"wikitext": "* <nowiki><div>foo</div></nowiki>\n* <nowiki><div style=\"color:red\">foo</div></nowiki>\n* <nowiki><td></nowiki>",
		"nodes": [
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<div>foo</div>",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<div style=\"color:red\">foo</div>",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "*",
				"name": "list"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<td>",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "3. multi-line html tag",
		"wikitext": "<nowiki><div\n>foo</div\n></nowiki>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<div",
				"name": "mw-tag-nowiki"
			},
			{
				"text": ">foo</div",
				"name": "mw-tag-nowiki"
			},
			{
				"text": ">",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "4. extension tags",
		"wikitext": "<nowiki><ref>foo</ref></nowiki>\n\n<nowiki><ref>bar</nowiki>\n\nbaz<nowiki></ref></nowiki>",
		"nodes": [
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<ref>foo</ref>",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<ref>bar",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "<",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "</ref>",
				"name": "mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-exttag-bracket mw-ext-nowiki"
			}
		]
	},
	{
		"desc": "Parsoid: newline inducing block nodes don't suppress <nowiki>",
		"wikitext": "a\n\n= foo =",
		"nodes": [
			{
				"text": "=",
				"name": "heading heading1"
			},
			{
				"text": " foo ",
				"name": "mw-section"
			},
			{
				"text": "=",
				"name": "heading"
			}
		]
	},
	{
		"desc": "Escaping nowikis",
		"wikitext": "&lt;nowiki&gt;foo&lt;/nowiki&gt;",
		"nodes": [
			{
				"text": "&lt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&gt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&lt;",
				"name": "mw-html-entity"
			},
			{
				"text": "&gt;",
				"name": "mw-html-entity"
			}
		]
	},
	{
		"desc": "(T54035) Nowiki-escaping should not get tripped by \" :\" in text",
		"wikitext": "foo's bar :",
		"nodes": []
	},
	{
		"desc": "Ensure that when a leading-whitespace-containing string is emitted on a newline, it is correctly escaped",
		"wikitext": "<div>\nABC\n{{1x|\n{{{!}}\n{{!}} a\n{{!}}}}} b",
		"nodes": [
			{
				"text": "<",
				"name": "angleBracket"
			},
			{
				"text": "div",
				"name": "tagName"
			},
			{
				"text": ">",
				"name": "angleBracket"
			},
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "{",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": " a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "!",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T400080: Numbered args with tags with attributes should serialize as named",
		"wikitext": "{{1x|1=<div class=\"a\">a</div>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div ",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "class=",
				"name": "mw-template-ground attributeName"
			},
			{
				"text": "\"a\"",
				"name": "mw-template-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T400080: Numbered args with tags with attributes should break on equals",
		"wikitext": "{{1x|<div class=\"a\">a</div>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div ",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "class=",
				"name": "mw-template-ground attributeName"
			},
			{
				"text": "\"a\"",
				"name": "mw-template-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T400080: Numbered args of pfs with tags with attributes should not be serialized as named",
		"wikitext": "{{#tag:div|<span class=\"c\">a</span>}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-ext-ground paren"
			},
			{
				"text": "#tag",
				"name": "mw-ext-ground keyword"
			},
			{
				"text": ":",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "div",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "|",
				"name": "mw-ext-ground punctuation"
			},
			{
				"text": "<",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "span ",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": "class=",
				"name": "mw-ext-ground attributeName"
			},
			{
				"text": "\"c\"",
				"name": "mw-ext-ground mw-htmltag-attribute-value"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "a",
				"name": "mw-ext-ground unit"
			},
			{
				"text": "</",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-ext-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-ext-ground angleBracket"
			},
			{
				"text": "}}",
				"name": "mw-ext-ground paren"
			}
		]
	},
	{
		"desc": "T400080: Template arg value with template with pipe nested in tag attribute value",
		"wikitext": "{{1x|test=<span class=\"{{1x|234}}\"><span>|second arg}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "test=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "span ",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "class=",
				"name": "mw-template-ground attributeName"
			},
			{
				"text": "\"",
				"name": "mw-template-ground mw-htmltag-attribute-value"
			},
			{
				"text": "{{",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template2-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template2-ground separator"
			},
			{
				"text": "234",
				"name": "mw-template2-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template2-ground bracket"
			},
			{
				"text": "\"",
				"name": "mw-template-ground mw-htmltag-attribute-value"
			},
			{
				"text": "><",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "second arg",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T400080: Numbered arg value with escaped tag attribute equals",
		"wikitext": "{{1x|<span class{{=}}\"test\">456</span>|123}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "span ",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "class",
				"name": "mw-template-ground attributeName"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "=",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "\"test\"",
				"name": "mw-template-ground attributeName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "456",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "span",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "123",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T400080: 1. Numbered arg value with extension tag in tag attribute value",
		"wikitext": "{{1x|<div class{{=}}\"<nowiki>hmm=haa</nowiki>\">asdf</div>|2=a|3=b|4=c}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div ",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "class",
				"name": "mw-template-ground attributeName"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "=",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "\"",
				"name": "mw-template-ground attributeName"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "hmm=haa",
				"name": "mw-template-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "\"",
				"name": "mw-template-ground attributeName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "asdf",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "2=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "3=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "4=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "c",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	},
	{
		"desc": "T400080: 2. Numbered arg value with extension tag in tag attribute value",
		"wikitext": "{{1x|1=<div class{{=}}\"<nowiki>hmm=haa</nowiki>\">asdf</div>|2=a|3=b|4=c}}",
		"nodes": [
			{
				"text": "{{",
				"name": "mw-template-ground bracket"
			},
			{
				"text": "1x",
				"name": "mw-template-ground moduleKeyword"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "1=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "<",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div ",
				"name": "mw-template-ground tagName"
			},
			{
				"text": "class",
				"name": "mw-template-ground attributeName"
			},
			{
				"text": "{{",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "=",
				"name": "mw-template-ext-ground keyword"
			},
			{
				"text": "}}",
				"name": "mw-template-ext-ground paren"
			},
			{
				"text": "\"",
				"name": "mw-template-ground attributeName"
			},
			{
				"text": "<",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "hmm=haa",
				"name": "mw-template-ground mw-tag-nowiki"
			},
			{
				"text": "</",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "nowiki",
				"name": "mw-template-ground mw-exttag-name mw-ext-nowiki"
			},
			{
				"text": ">",
				"name": "mw-template-ground mw-exttag-bracket mw-ext-nowiki"
			},
			{
				"text": "\"",
				"name": "mw-template-ground attributeName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "asdf",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "</",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "div",
				"name": "mw-template-ground tagName"
			},
			{
				"text": ">",
				"name": "mw-template-ground angleBracket"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "2=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "a",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "3=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "b",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "|",
				"name": "mw-template-ground separator"
			},
			{
				"text": "4=",
				"name": "mw-template-ground definitionKeyword"
			},
			{
				"text": "c",
				"name": "mw-template-ground attributeValue"
			},
			{
				"text": "}}",
				"name": "mw-template-ground bracket"
			}
		]
	}
]
