// Lute - 一款结构化的 Markdown 引擎，支持 Go 和 JavaScript
// Copyright (c) 2019-present, b3log.org
//
// Lute is licensed under Mulan PSL v2.
// You can use this software according to the terms and conditions of the Mulan PSL v2.
// You may obtain a copy of Mulan PSL v2 at:
//         http://license.coscl.org.cn/MulanPSL2
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
// See the Mulan PSL v2 for more details.

package test

import (
	"testing"

	"github.com/88250/lute"
)

var spinVditorIRDOMTests = []*parseTest{

	{"53", "<p data-block=\"0\"><span data-type=\"sup\" class=\"vditor-ir__node\"><span class=\"vditor-ir__marker\">^</span><sup data-newline=\"1\">foo</sup><span class=\"vditor-ir__marker\">^b<wbr></span></span></p>", "<p data-block=\"0\"><span data-type=\"sup\" class=\"vditor-ir__node\"><span class=\"vditor-ir__marker\">^</span><sup data-newline=\"1\">foo</sup><span class=\"vditor-ir__marker\">^</span></span>b<wbr></p>"},
	{"52", "<table data-block=\"0\" data-type=\"table\"><thead><tr><th><span data-type=\"inline-node\" class=\"vditor-ir__node\"><span class=\"vditor-ir__marker\">$</span><code data-newline=\"1\" class=\"vditor-ir__marker vditor-ir__marker--pre\" data-type=\"math-inline\">\\|foo</code><span class=\"vditor-ir__preview\" data-render=\"1\"><span class=\"language-math\" data-math=\"|foo\"><span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\"></span><span class=\"mord\">∣</span><span class=\"mord mathnormal\">f</span><span class=\"mord mathnormal\">oo</span></span></span></span></span></span><span class=\"vditor-ir__marker\">$</span></span>b<wbr></th></tr></thead></table>", "<table data-block=\"0\" data-type=\"table\"><thead><tr><th><span data-type=\"inline-node\" class=\"vditor-ir__node\"><span class=\"vditor-ir__marker\">$</span><code data-newline=\"1\" class=\"vditor-ir__marker vditor-ir__marker--pre\" data-type=\"math-inline\">\\|foo</code><span class=\"vditor-ir__preview\" data-render=\"2\"><span class=\"language-math\">|foo</span></span><span class=\"vditor-ir__marker\">$</span></span>b<wbr></th></tr></thead></table>"},
	{"51", "<p data-block=\"0\"><span data-type=\"a\" class=\"vditor-ir__node\"><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">[</span><span class=\"vditor-ir__link\">link</span><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">]</span><span class=\"vditor-ir__marker vditor-ir__marker--paren\">(</span><span class=\"vditor-ir__marker vditor-ir__marker--link\">http://baidu.com?q=test&region=china</span><span class=\"vditor-ir__marker vditor-ir__marker--paren\">)</span></span></p>", "<p data-block=\"0\"><span data-type=\"a\" class=\"vditor-ir__node\"><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">[</span><span class=\"vditor-ir__link\">link</span><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">]</span><span class=\"vditor-ir__marker vditor-ir__marker--paren\">(</span><span class=\"vditor-ir__marker vditor-ir__marker--link\">http://baidu.com?q=test&amp;region=china</span><span class=\"vditor-ir__marker vditor-ir__marker--paren\">)</span></span></p>"},
	{"50", "<blockquote data-block=\"0\"><p data-block=\"0\"><wbr><br></p></blockquote>", "<blockquote data-block=\"0\"><p data-block=\"0\"><wbr></p></blockquote>"},
	{"49", "<p data-block=\"0\"><span data-type=\"inline-math\" class=\"vditor-ir__node\"><span class=\"vditor-ir__marker\">$<wbr></span><span class=\"vditor-ir__marker\">$</span></span></p>", "<p data-block=\"0\"><span data-type=\"inline-node\" class=\"vditor-ir__node vditor-ir__node--expand\"><span class=\"vditor-ir__marker\">$</span><code data-newline=\"1\" class=\"vditor-ir__marker vditor-ir__marker--pre\" data-type=\"math-inline\"><wbr></code><span class=\"vditor-ir__preview\" data-render=\"2\"><span class=\"language-math\"></span></span><span class=\"vditor-ir__marker\">$</span></span></p>"},
	{"48", "<p data-block=\"0\">foo<span data-type=\"backslash\" class=\"vditor-ir__node\"><span class=\"vditor-ir__marker vditor-ir__marker--bi\">\\</span>*</span>bar<wbr></p>", "<p data-block=\"0\">foo<span data-type=\"backslash\" class=\"vditor-ir__node\"><span class=\"vditor-ir__marker vditor-ir__marker--bi\">\\</span>*</span>bar<wbr></p>"},
	{"48", "<blockquote data-block=\"0\"><p data-block=\"0\"><br></p><p data-block=\"0\"><wbr>foo</p></blockquote>", "<blockquote data-block=\"0\"><p data-block=\"0\"><wbr>foo</p></blockquote>"},
	{"47", "<p data-block=\"0\"><span data-type=\"html-entity\" class=\"vditor-ir__node\"><code data-newline=\"1\" class=\"vditor-ir__marker vditor-ir__marker--pre\" data-type=\"html-entity\">&amp;emsp;</code><span class=\"vditor-ir__preview\" data-render=\"1\"><code> </code></span>foo<wbr></span></p>", "<p data-block=\"0\"><span data-type=\"html-entity\" class=\"vditor-ir__node\"><code data-newline=\"1\" class=\"vditor-ir__marker vditor-ir__marker--pre\" data-type=\"html-entity\">&amp;emsp;</code><span class=\"vditor-ir__preview\" data-render=\"2\"><code>&emsp;</code></span></span>foo<wbr></p>"},
	{"46", "<p data-block=\"0\">==foo==<wbr></p>", "<p data-block=\"0\"><span data-type=\"mark\" class=\"vditor-ir__node vditor-ir__node--expand\"><span class=\"vditor-ir__marker\">==</span><mark data-newline=\"1\">foo</mark><span class=\"vditor-ir__marker\">==</span></span><wbr></p>"},
	{"45", "<p data-block=\"0\">foo\n```\nbar\n```<wbr></p>", "<p data-block=\"0\">foo</p><div data-block=\"0\" data-type=\"code-block\" class=\"vditor-ir__node vditor-ir__node--expand\"><span data-type=\"code-block-open-marker\">```</span><span class=\"vditor-ir__marker vditor-ir__marker--info\" data-type=\"code-block-info\">\u200b</span><pre class=\"vditor-ir__marker--pre vditor-ir__marker\"><code>bar<wbr>\n</code></pre><pre class=\"vditor-ir__preview\" data-render=\"2\"><code>bar</code></pre><span data-type=\"code-block-close-marker\">```</span></div>"},
	{"44", "<div data-block=\"0\" data-type=\"yaml-front-matter\" class=\"vditor-ir__node\"><span data-type=\"yaml-front-matter-open-marker\">---</span><pre class=\"vditor-ir__marker--pre\"><code data-type=\"yaml-front-matter\" class=\"language-yaml\">foo<wbr></code></pre><span data-type=\"yaml-front-matter-close-marker\">---</span></div>", "<div data-block=\"0\" data-type=\"yaml-front-matter\" class=\"vditor-ir__node vditor-ir__node--expand\"><span data-type=\"yaml-front-matter-open-marker\">---</span><pre class=\"vditor-ir__marker--pre\"><code data-type=\"yaml-front-matter\" class=\"language-yaml\">foo<wbr></code></pre><span data-type=\"yaml-front-matter-close-marker\">---</span></div>"},
	{"43", "<p data-block=\"0\"><span data-type=\"html-inline\" class=\"vditor-ir__node\"><code class=\"vditor-ir__marker\">&lt;kbd&gt;</code></span><kbd>foo*bar*<wbr></kbd><span data-type=\"html-inline\" class=\"vditor-ir__node\"><code class=\"vditor-ir__marker\">&lt;/kbd&gt;</code></span></p>", "<p data-block=\"0\"><span data-type=\"html-inline\" class=\"vditor-ir__node\"><code class=\"vditor-ir__marker\">&lt;kbd&gt;</code></span><kbd>foo<span data-type=\"em\" class=\"vditor-ir__node vditor-ir__node--expand\"><span class=\"vditor-ir__marker vditor-ir__marker--bi\">*</span><em data-newline=\"1\">bar</em><span class=\"vditor-ir__marker vditor-ir__marker--bi\">*</span></span><wbr></kbd><span data-type=\"html-inline\" class=\"vditor-ir__node vditor-ir__node--expand\"><code class=\"vditor-ir__marker\">&lt;/kbd&gt;</code></span></p>"},
	{"42", "<p data-block=\"0\"><span data-type=\"html-inline\" class=\"vditor-ir__node\"><code class=\"vditor-ir__marker\">&lt;kbd&gt;</code></span>foo&lt;/kbd&gt;<wbr></p>", "<p data-block=\"0\"><span data-type=\"html-inline\" class=\"vditor-ir__node\"><code class=\"vditor-ir__marker\">&lt;kbd&gt;</code></span><kbd>foo</kbd><span data-type=\"html-inline\" class=\"vditor-ir__node vditor-ir__node--expand\"><code class=\"vditor-ir__marker\">&lt;/kbd&gt;</code></span><wbr></p>"},
	{"41", "<p data-block=\"0\"><span data-type=\"html-inline\" class=\"vditor-ir__node\"><code class=\"vditor-ir__marker\">&lt;kbd&gt;</code></span>foo<wbr></p>", "<p data-block=\"0\"><span data-type=\"html-inline\" class=\"vditor-ir__node\"><code class=\"vditor-ir__marker\">&lt;kbd&gt;</code></span>foo<wbr></p>"},
	{"40", "<h2 data-block=\"0\" class=\"vditor-ir__node\" id=\"ir-foob_0\" data-marker=\"-\">foo<wbr>\n<span class=\"vditor-ir__marker vditor-ir__marker--heading\" data-type=\"heading-marker\" data-render=\"2\">------</span></h2>", "<h2 data-block=\"0\" class=\"vditor-ir__node vditor-ir__node--expand\" id=\"ir-foo\" data-marker=\"-\">foo<wbr><span class=\"vditor-ir__marker vditor-ir__marker--heading\" data-type=\"heading-marker\" data-render=\"2\">\n---</span></h2>"},
	{"39", "<p data-block=\"0\">:smile:<wbr></p>", "<p data-block=\"0\">​<span data-type=\"emoji\" class=\"vditor-ir__node vditor-ir__node--expand\"><span data-render=\"2\">😄</span><span class=\"vditor-ir__marker\">:smile:</span></span><wbr></p>"},
	{"38", "<h1 data-block=\"0\" class=\"vditor-ir__node\" id=\"ir-id_0\" data-marker=\"#\"><span class=\"vditor-ir__marker vditor-ir__marker--heading\" data-type=\"heading-marker\"># </span>foo<span data-type=\"heading-id\" class=\"vditor-ir__marker\"> {id}b<wbr></span></h1>", "<h1 data-block=\"0\" class=\"vditor-ir__node vditor-ir__node--expand\" id=\"ir-foo--id-b\" data-marker=\"#\"><span class=\"vditor-ir__marker vditor-ir__marker--heading\" data-type=\"heading-marker\"># </span>foo {id}b<wbr></h1>"},
	{"37", "<h1 data-block=\"0\" class=\"vditor-ir__node vditor-ir__node--expand\" id=\"ir-id<wbr>\" data-marker=\"#\"><span class=\"vditor-ir__marker vditor-ir__marker--heading\" data-type=\"heading-marker\"># </span>foo<span data-type=\"heading-id\" class=\"vditor-ir__marker\"> {id<wbr>}</span></h1>", "<h1 data-block=\"0\" class=\"vditor-ir__node vditor-ir__node--expand\" id=\"ir-id<wbr>\" data-marker=\"#\"><span class=\"vditor-ir__marker vditor-ir__marker--heading\" data-type=\"heading-marker\"># </span>foo<span data-type=\"heading-id\" class=\"vditor-ir__marker\"> {id<wbr>}</span></h1>"},
	{"36", "<ul data-marker=\"*\" data-block=\"0\"><li data-marker=\"*\"><p data-block=\"0\">foo</p><div data-block=\"0\" data-type=\"code-block\" class=\"vditor-ir__node\"><span data-type=\"code-block-open-marker\">```</span><span class=\"vditor-ir__marker vditor-ir__marker--info\" data-type=\"code-block-info\">​</span><pre class=\"vditor-ir__marker--pre vditor-ir__marker\"><code>bar\n</code></pre><pre class=\"vditor-ir__preview\" data-render=\"1\"><div class=\"vditor-copy\"><textarea></textarea><span aria-label=\"复制\" onmouseover=\"this.setAttribute('aria-label', '复制')\" class=\"b3-tooltips b3-tooltips__w\" onclick=\"this.previousElementSibling.select();document.execCommand('copy');this.setAttribute('aria-label', '已复制')\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" width=\"32px\" height=\"32px\"> <path d=\"M28.681 11.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-11.5c-1.379 0-2.5 1.121-2.5 2.5v23c0 1.378 1.121 2.5 2.5 2.5h19c1.378 0 2.5-1.122 2.5-2.5v-15.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 9.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268v0zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-19c-0.271 0-0.5-0.229-0.5-0.5v-23c0-0.271 0.229-0.5 0.5-0.5 0 0 11.499-0 11.5 0v7c0 0.552 0.448 1 1 1h7v15.5zM18.841 1.319c-1.612-1.182-2.393-1.319-2.841-1.319h-11.5c-1.378 0-2.5 1.121-2.5 2.5v23c0 1.207 0.86 2.217 2 2.45v-25.45c0-0.271 0.229-0.5 0.5-0.5h15.215c-0.301-0.248-0.595-0.477-0.873-0.681z\"></path> </svg></span></div><code class=\"hljs nginx\" style=\"max-height: 1000px;\"><span class=\"hljs-attribute\">bar</span>\n</code></pre><span data-type=\"code-block-close-marker\">```</span></div><p data-block=\"0\">baz</p><div data-block=\"0\" data-type=\"code-block\" class=\"vditor-ir__node\"><span data-type=\"code-block-open-marker\">```</span><span class=\"vditor-ir__marker vditor-ir__marker--info\" data-type=\"code-block-info\">​</span><pre class=\"vditor-ir__marker--pre vditor-ir__marker\"><code>b<wbr></code></pre><pre class=\"vditor-ir__preview\" data-render=\"1\"><div class=\"vditor-copy\"><textarea></textarea><span aria-label=\"复制\" onmouseover=\"this.setAttribute('aria-label', '复制')\" class=\"b3-tooltips b3-tooltips__w\" onclick=\"this.previousElementSibling.select();document.execCommand('copy');this.setAttribute('aria-label', '已复制')\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" width=\"32px\" height=\"32px\"> <path d=\"M28.681 11.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-11.5c-1.379 0-2.5 1.121-2.5 2.5v23c0 1.378 1.121 2.5 2.5 2.5h19c1.378 0 2.5-1.122 2.5-2.5v-15.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 9.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268v0zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-19c-0.271 0-0.5-0.229-0.5-0.5v-23c0-0.271 0.229-0.5 0.5-0.5 0 0 11.499-0 11.5 0v7c0 0.552 0.448 1 1 1h7v15.5zM18.841 1.319c-1.612-1.182-2.393-1.319-2.841-1.319h-11.5c-1.378 0-2.5 1.121-2.5 2.5v23c0 1.207 0.86 2.217 2 2.45v-25.45c0-0.271 0.229-0.5 0.5-0.5h15.215c-0.301-0.248-0.595-0.477-0.873-0.681z\"></path> </svg></span></div><code class=\"hljs\"></code></pre><span data-type=\"code-block-close-marker\">```</span></div></li></ul>", "<ul data-marker=\"*\" data-block=\"0\"><li data-marker=\"*\"><p data-block=\"0\">foo</p><div data-block=\"0\" data-type=\"code-block\" class=\"vditor-ir__node\"><span data-type=\"code-block-open-marker\">```</span><span class=\"vditor-ir__marker vditor-ir__marker--info\" data-type=\"code-block-info\">\u200b</span><pre class=\"vditor-ir__marker--pre vditor-ir__marker\"><code>bar\n</code></pre><pre class=\"vditor-ir__preview\" data-render=\"2\"><code>bar\n</code></pre><span data-type=\"code-block-close-marker\">```</span></div><p data-block=\"0\">baz</p><div data-block=\"0\" data-type=\"code-block\" class=\"vditor-ir__node vditor-ir__node--expand\"><span data-type=\"code-block-open-marker\">```</span><span class=\"vditor-ir__marker vditor-ir__marker--info\" data-type=\"code-block-info\">\u200b</span><pre class=\"vditor-ir__marker--pre vditor-ir__marker\"><code>b<wbr>\n</code></pre><pre class=\"vditor-ir__preview\" data-render=\"2\"><code>b\n</code></pre><span data-type=\"code-block-close-marker\">```</span></div></li></ul>"},
	{"35", "<p data-block=\"0\">foo\\<wbr>ar</p>", "<p data-block=\"0\">foo\\<wbr>ar</p>"},
	{"34", "<p data-block=\"0\"><span data-type=\"html-inline\" class=\"vditor-ir__node\"><code class=\"vditor-ir__marker\">&lt;abcd<wbr>&gt;</code></span>", "<p data-block=\"0\"><span data-type=\"html-inline\" class=\"vditor-ir__node vditor-ir__node--expand\"><code class=\"vditor-ir__marker\">&lt;abcd<wbr>&gt;</code></span></p>"},
	{"33", "<p data-block=\"0\"><span data-type=\"html-inline\" class=\"vditor-ir__node\"><code class=\"vditor-ir__marker\">&lt;bar&gt;b<wbr></code></span></p>", "<p data-block=\"0\"><span data-type=\"html-inline\" class=\"vditor-ir__node\"><code class=\"vditor-ir__marker\">&lt;bar&gt;</code></span>b<wbr></p>"},
	{"32", "<div data-block=\"0\" data-type=\"html-block\" class=\"vditor-ir__node\"><pre class=\"vditor-ir__marker--pre vditor-ir__marker\"><code data-type=\"html-block\">&lt;details&gt;\n&lt;summary&gt;这里是摘要部分。1<wbr>&lt;/summary&gt;\n这里是细节部分。\n&lt;/details&gt;</code></pre><pre class=\"vditor-ir__preview\" data-render=\"1\"><details open=\"\">\n<summary>这里是摘要部分。12</summary>\n这里是细节部分。\n</details></pre></div>", "<div data-block=\"0\" data-type=\"html-block\" class=\"vditor-ir__node vditor-ir__node--expand\"><pre class=\"vditor-ir__marker--pre vditor-ir__marker\"><code data-type=\"html-block\">&lt;details&gt;\n&lt;summary&gt;这里是摘要部分。1<wbr>&lt;/summary&gt;\n这里是细节部分。\n&lt;/details&gt;</code></pre><pre class=\"vditor-ir__preview\" data-render=\"2\"><details>\n<summary>这里是摘要部分。1</summary>\n这里是细节部分。\n</details></pre></div>"},
	{"31", "<div data-block=\"0\" data-type=\"code-block\" class=\"vditor-ir__node\"><span data-type=\"code-block-open-marker\">```</span><span class=\"vditor-ir__marker vditor-ir__marker--info\" data-type=\"code-block-info\">​</span><pre class=\"vditor-ir__marker--pre vditor-ir__marker\"><code>foo\n</code></pre><pre class=\"vditor-ir__preview\" data-render=\"1\"><div class=\"vditor-copy\"><textarea></textarea><span aria-label=\"复制\" onmouseover=\"this.setAttribute('aria-label', '复制')\" class=\"b3-tooltips b3-tooltips__w\" onclick=\"this.previousElementSibling.select();document.execCommand('copy');this.setAttribute('aria-label', '已复制')\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" width=\"32px\" height=\"32px\"> <path d=\"M28.681 11.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-11.5c-1.379 0-2.5 1.121-2.5 2.5v23c0 1.378 1.121 2.5 2.5 2.5h19c1.378 0 2.5-1.122 2.5-2.5v-15.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 9.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268v0zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-19c-0.271 0-0.5-0.229-0.5-0.5v-23c0-0.271 0.229-0.5 0.5-0.5 0 0 11.499-0 11.5 0v7c0 0.552 0.448 1 1 1h7v15.5zM18.841 1.319c-1.612-1.182-2.393-1.319-2.841-1.319h-11.5c-1.378 0-2.5 1.121-2.5 2.5v23c0 1.207 0.86 2.217 2 2.45v-25.45c0-0.271 0.229-0.5 0.5-0.5h15.215c-0.301-0.248-0.595-0.477-0.873-0.681z\"></path> </svg></span></div><code class=\"hljs nginx\" style=\"max-height: 1000px;\"><span class=\"hljs-attribute\">foo</span>\n</code></pre><span data-type=\"code-block-close-marker\">```</span></div><p data-block=\"0\"><wbr></p>", "<div data-block=\"0\" data-type=\"code-block\" class=\"vditor-ir__node\"><span data-type=\"code-block-open-marker\">```</span><span class=\"vditor-ir__marker vditor-ir__marker--info\" data-type=\"code-block-info\">\u200b</span><pre class=\"vditor-ir__marker--pre vditor-ir__marker\"><code>foo\n</code></pre><pre class=\"vditor-ir__preview\" data-render=\"2\"><code>foo\n</code></pre><span data-type=\"code-block-close-marker\">```</span></div><p data-block=\"0\"><wbr></p>"},
	{"30", "<p data-block=\"0\"><span class=\"vditor-ir__node\"><span class=\"vditor-ir__marker\">!</span><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">[</span><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">]</span><span class=\"vditor-ir__marker vditor-ir__marker--paren\">(</span><span class=\"vditor-ir__marker vditor-ir__marker--link\">bar</span><span class=\"vditor-ir__marker vditor-ir__marker--paren\">)<wbr></span></span></p>", "<p data-block=\"0\"><span class=\"vditor-ir__node vditor-ir__node--expand\" data-type=\"img\"><span class=\"vditor-ir__marker\">!</span><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">[</span><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">]</span><span class=\"vditor-ir__marker vditor-ir__marker--paren\">(</span><span class=\"vditor-ir__marker vditor-ir__marker--link\">bar</span><span class=\"vditor-ir__marker vditor-ir__marker--paren\">)</span><wbr><img src=\"bar\" /></span></p>"},
	{"29", "<h2 data-block=\"0\" class=\"vditor-ir__node\" data-marker=\"#\"><span class=\"vditor-ir__marker vditor-ir__marker--heading\" data-type=\"heading-marker\">## f<wbr></span>oo</h2>", "<h2 data-block=\"0\" class=\"vditor-ir__node vditor-ir__node--expand\" id=\"ir-foo\" data-marker=\"#\"><span class=\"vditor-ir__marker vditor-ir__marker--heading\" data-type=\"heading-marker\">## </span>f<wbr>oo</h2>"},
	{"28", "<h1 data-block=\"0\" data-marker=\"=\">foo</h1><p data-block=\"0\">b<wbr></p>", "<h1 data-block=\"0\" class=\"vditor-ir__node\" id=\"ir-foo\" data-marker=\"=\">foo<span class=\"vditor-ir__marker vditor-ir__marker--heading\" data-type=\"heading-marker\" data-render=\"2\">\n===</span></h1><p data-block=\"0\">b<wbr></p>"},
	{"27", "<div data-block=\"0\" data-type=\"footnotes-block\"><div data-type=\"footnotes-def\"><span data-type=\"footnotes-def-label\">[^fn]: </span><p data-block=\"0\">f<wbr></p></div></div>", "<div data-block=\"0\" data-type=\"footnotes-block\"><div data-type=\"footnotes-def\">[^fn]: <p data-block=\"0\">f<wbr></p></div></div>"},
	{"26", "<p data-block=\"0\">[^fn]: f<wbr></p>", "<div data-block=\"0\" data-type=\"footnotes-block\"><div data-type=\"footnotes-def\">[^fn]: <p data-block=\"0\">f<wbr></p></div></div>"},
	{"25", "<p data-block=\"0\">[text][foo]<wbr></p><div data-block=\"0\" data-type=\"link-ref-defs-block\">[foo]: bar\n</div>", "<p data-block=\"0\"><span data-type=\"link-ref\" class=\"vditor-ir__node vditor-ir__node--expand\"><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">[</span><span>text</span><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">]</span><span class=\"vditor-ir__marker vditor-ir__marker--link\">[foo]</span></span><wbr></p><div data-block=\"0\" data-type=\"link-ref-defs-block\">[foo]: bar\n</div>"},
	{"24", "<p data-block=\"0\">[foo]<wbr></p><div data-block=\"0\" data-type=\"link-ref-defs-block\">[foo]: bar\n</div>", "<p data-block=\"0\"><span data-type=\"link-ref\" class=\"vditor-ir__node vditor-ir__node--expand\"><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">[</span><span>foo</span><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">]</span></span><wbr></p><div data-block=\"0\" data-type=\"link-ref-defs-block\">[foo]: bar\n</div>"},
	{"23", "<p data-block=\"0\">[foo](bar \"\")<wbr></p>", "<p data-block=\"0\"><span data-type=\"a\" class=\"vditor-ir__node vditor-ir__node--expand\"><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">[</span><span class=\"vditor-ir__link\">foo</span><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">]</span><span class=\"vditor-ir__marker vditor-ir__marker--paren\">(</span><span class=\"vditor-ir__marker vditor-ir__marker--link\">bar</span> <span class=\"vditor-ir__marker vditor-ir__marker--title\">\"<wbr>\"</span><span class=\"vditor-ir__marker vditor-ir__marker--paren\">)</span></span></p>"},
	{"22", "<p data-block=\"0\">[foo](bar \"\"<wbr>)</p>", "<p data-block=\"0\"><span data-type=\"a\" class=\"vditor-ir__node vditor-ir__node--expand\"><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">[</span><span class=\"vditor-ir__link\">foo</span><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">]</span><span class=\"vditor-ir__marker vditor-ir__marker--paren\">(</span><span class=\"vditor-ir__marker vditor-ir__marker--link\">bar</span> <span class=\"vditor-ir__marker vditor-ir__marker--title\">\"<wbr>\"</span><span class=\"vditor-ir__marker vditor-ir__marker--paren\">)</span></span></p>"},
	{"21", "<p data-block=\"0\">[foo](bar \"b\"<wbr>)</p>", "<p data-block=\"0\"><span data-type=\"a\" class=\"vditor-ir__node vditor-ir__node--expand\"><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">[</span><span class=\"vditor-ir__link\">foo</span><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">]</span><span class=\"vditor-ir__marker vditor-ir__marker--paren\">(</span><span class=\"vditor-ir__marker vditor-ir__marker--link\">bar</span> <span class=\"vditor-ir__marker vditor-ir__marker--title\">\"b\"</span><span class=\"vditor-ir__marker vditor-ir__marker--paren\">)</span></span><wbr></p>"},
	{"20", "<p data-block=\"0\"><span data-type=\"a\" class=\"vditor-ir__node\"><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">[</span><span class=\"vditor-ir__link\">foo</span><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">]</span><span class=\"vditor-ir__marker vditor-ir__marker--paren\">(</span><span class=\"vditor-ir__marker vditor-ir__marker--link\">bar</span> <span class=\"vditor-ir__marker vditor-ir__marker--title\">\"b<wbr>\"</span><span class=\"vditor-ir__marker vditor-ir__marker--paren\">)</span></span></p>", "<p data-block=\"0\"><span data-type=\"a\" class=\"vditor-ir__node vditor-ir__node--expand\"><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">[</span><span class=\"vditor-ir__link\">foo</span><span class=\"vditor-ir__marker vditor-ir__marker--bracket\">]</span><span class=\"vditor-ir__marker vditor-ir__marker--paren\">(</span><span class=\"vditor-ir__marker vditor-ir__marker--link\">bar</span> <span class=\"vditor-ir__marker vditor-ir__marker--title\">\"b<wbr>\"</span><span class=\"vditor-ir__marker vditor-ir__marker--paren\">)</span></span></p>"},
	{"19", "<p data-block=\"0\">&lt;foo<wbr>&gt;</p>", "<p data-block=\"0\"><span data-type=\"html-inline\" class=\"vditor-ir__node vditor-ir__node--expand\"><code class=\"vditor-ir__marker\">&lt;foo<wbr>&gt;</code></span></p>"},
	{"18", "<p data-block=\"0\">&lt;<wbr></p>", "<p data-block=\"0\">&lt;<wbr></p>"},
	{"17", "<p data-block=\"0\">&lt;fo<wbr>o&gt;</p>", "<p data-block=\"0\"><span data-type=\"html-inline\" class=\"vditor-ir__node vditor-ir__node--expand\"><code class=\"vditor-ir__marker\">&lt;fo<wbr>o&gt;</code></span></p>"},
	{"16", "<p data-block=\"0\">**<wbr>**</p>", "<p data-block=\"0\"><span data-type=\"strong\" class=\"vditor-ir__node vditor-ir__node--expand\"><span class=\"vditor-ir__marker vditor-ir__marker--bi\">**</span><strong data-newline=\"1\"><wbr></strong><span class=\"vditor-ir__marker vditor-ir__marker--bi\">**</span></span></p>"},
	{"15", "<h1 data-block=\"0\" class=\"vditor-ir__node\" data-marker=\"#\"><span class=\"vditor-ir__marker vditor-ir__marker--heading\" data-type=\"heading-marker\"># </span>foo</h1><div><wbr><br></div>", "<h1 data-block=\"0\" class=\"vditor-ir__node\" id=\"ir-foo\" data-marker=\"#\"><span class=\"vditor-ir__marker vditor-ir__marker--heading\" data-type=\"heading-marker\"># </span>foo</h1><p data-block=\"0\"><wbr></p>"},
	{"14", "<h1 data-block=\"0\" class=\"vditor-ir__node\" data-marker=\"#\"><span class=\"vditor-ir__marker vditor-ir__marker--heading\" data-type=\"heading-marker\" >#<wbr># </span>f</h1>", "<h2 data-block=\"0\" class=\"vditor-ir__node vditor-ir__node--expand\" id=\"ir-f\" data-marker=\"#\"><span class=\"vditor-ir__marker vditor-ir__marker--heading\" data-type=\"heading-marker\">## </span><wbr>f</h2>"},
	{"13", "<p data-block=\"0\"># <wbr>f</p>", "<h1 data-block=\"0\" class=\"vditor-ir__node vditor-ir__node--expand\" id=\"ir-f\" data-marker=\"#\"><span class=\"vditor-ir__marker vditor-ir__marker--heading\" data-type=\"heading-marker\"># </span><wbr>f</h1>"},
	{"12", "<p data-block=\"0\"><span data-type=\"inline-node\" class=\"vditor-ir__node\"><span class=\"vditor-ir__marker\">$</span><code data-newline=\"1\" class=\"vditor-ir__marker--pre vditor-ir__marker\">ab<wbr></code><span class=\"vditor-ir__preview\" data-render=\"1\"><code class=\"language-math\"><span data-math=\"ab\"><span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\"></span><span class=\"mord mathdefault\">a</span><span class=\"mord mathdefault\">b</span></span></span></span></span></code></span><span class=\"vditor-ir__marker\">$</span></span></p>", "<p data-block=\"0\"><span data-type=\"inline-node\" class=\"vditor-ir__node vditor-ir__node--expand\"><span class=\"vditor-ir__marker\">$</span><code data-newline=\"1\" class=\"vditor-ir__marker vditor-ir__marker--pre\" data-type=\"math-inline\">ab<wbr></code><span class=\"vditor-ir__preview\" data-render=\"2\"><span class=\"language-math\">ab</span></span><span class=\"vditor-ir__marker\">$</span></span></p>"},
	{"11", "<div data-block=\"0\" data-type=\"math-block\" class=\"vditor-ir__node\"><span data-type=\"math-block-open-marker\">$$</span><pre class=\"vditor-ir__marker--pre vditor-ir__marker\"><code data-type=\"math-block\">foo</code></pre><pre class=\"vditor-ir__preview\" data-render=\"1\"><code data-type=\"math-block\">foo\n</code></pre><span data-type=\"math-block-close-marker\">$$</span></div>", "<div data-block=\"0\" data-type=\"math-block\" class=\"vditor-ir__node\"><span data-type=\"math-block-open-marker\">$$</span><pre class=\"vditor-ir__marker--pre vditor-ir__marker\"><code data-type=\"math-block\" class=\"language-math\">foo</code></pre><pre class=\"vditor-ir__preview\" data-render=\"2\"><div data-type=\"math-block\" class=\"language-math\">foo</div></pre><span data-type=\"math-block-close-marker\">$$</span></div>"},
	{"10", "<p data-block=\"0\">foo<span data-type=\"html-inline\" class=\"vditor-ir__node\"><code class=\"vditor-ir__marker\">&lt;bar&gt;</code><span class=\"vditor-ir__preview\" data-render=\"1\"><bar></span></span>baz<wbr></p>", "<p data-block=\"0\">foo<span data-type=\"html-inline\" class=\"vditor-ir__node\"><code class=\"vditor-ir__marker\">&lt;bar&gt;</code></span>baz<wbr></p>"},
	{"9", "<p data-block=\"0\"><span data-type=\"inline-node\" class=\"vditor-ir__node\"><span class=\"vditor-ir__marker\">$</span><code data-newline=\"1\">foo</code><span class=\"vditor-ir__marker\">$</span></span></p>", "<p data-block=\"0\"><span data-type=\"inline-node\" class=\"vditor-ir__node\"><span class=\"vditor-ir__marker\">$</span><code data-newline=\"1\" class=\"vditor-ir__marker vditor-ir__marker--pre\" data-type=\"math-inline\">foo</code><span class=\"vditor-ir__preview\" data-render=\"2\"><span class=\"language-math\">foo</span></span><span class=\"vditor-ir__marker\">$</span></span></p>"},
	{"8", "<div data-block=\"0\" data-type=\"code-block\" class=\"vditor-ir__node\"><span data-type=\"code-block-open-marker\">```</span><span class=\"vditor-ir__marker vditor-ir__marker--info\" data-type=\"code-block-info\">​java</span><pre class=\"vditor-ir__marker--pre vditor-ir__marker\"><code class=\"language-java\">foo<wbr>\n</code></pre><span data-type=\"code-block-close-marker\">```</span></div>", "<div data-block=\"0\" data-type=\"code-block\" class=\"vditor-ir__node vditor-ir__node--expand\"><span data-type=\"code-block-open-marker\">```</span><span class=\"vditor-ir__marker vditor-ir__marker--info\" data-type=\"code-block-info\">\u200bjava</span><pre class=\"vditor-ir__marker--pre vditor-ir__marker\"><code class=\"language-java\">foo<wbr>\n</code></pre><pre class=\"vditor-ir__preview\" data-render=\"2\"><code class=\"language-java\">foo\n</code></pre><span data-type=\"code-block-close-marker\">```</span></div>"},
	{"7", "<div data-block=\"0\" data-type=\"code-block\" class=\"vditor-ir__node\"><span class=\"vditor-ir__marker\" data-type=\"code-block-open-marker\">```<wbr></span><pre><code class=\"language-j\">foo\n</code></pre><span class=\"vditor-ir__marker\" data-type=\"code-block-close-marker\">```</span></div>", "<div data-block=\"0\" data-type=\"code-block\" class=\"vditor-ir__node vditor-ir__node--expand\"><span data-type=\"code-block-open-marker\">```</span><span class=\"vditor-ir__marker vditor-ir__marker--info\" data-type=\"code-block-info\">\u200b<wbr></span><pre class=\"vditor-ir__marker--pre vditor-ir__marker\"><code>foo\n</code></pre><pre class=\"vditor-ir__preview\" data-render=\"2\"><code>foo\n</code></pre><span data-type=\"code-block-close-marker\">```</span></div>"},
	{"6", "<p data-block=\"0\">```<wbr></p>", "<div data-block=\"0\" data-type=\"code-block\" class=\"vditor-ir__node vditor-ir__node--expand\"><span data-type=\"code-block-open-marker\">```</span><span class=\"vditor-ir__marker vditor-ir__marker--info\" data-type=\"code-block-info\">\u200b<wbr></span><pre class=\"vditor-ir__marker--pre vditor-ir__marker\"><code>\n</code></pre><pre class=\"vditor-ir__preview\" data-render=\"2\"><code></code></pre><span data-type=\"code-block-close-marker\">```</span></div>"},
	{"5", "<h1 data-block=\"0\" class=\"vditor-ir__node\" data-marker=\"#\"><span class=\"vditor-ir__marker vditor-ir__marker--heading\" data-type=\"heading-marker\"># </span>f<wbr></h1>", "<h1 data-block=\"0\" class=\"vditor-ir__node vditor-ir__node--expand\" id=\"ir-f\" data-marker=\"#\"><span class=\"vditor-ir__marker vditor-ir__marker--heading\" data-type=\"heading-marker\"># </span>f<wbr></h1>"},
	{"4", "<h1 data-block=\"0\" class=\"vditor-ir__node\" data-marker=\"#\"><span class=\"vditor-ir__marker vditor-ir__marker--heading\" data-type=\"heading-marker\"># </span>foo</h1><p><wbr><br></p>", "<h1 data-block=\"0\" class=\"vditor-ir__node\" id=\"ir-foo\" data-marker=\"#\"><span class=\"vditor-ir__marker vditor-ir__marker--heading\" data-type=\"heading-marker\"># </span>foo</h1><p data-block=\"0\"><wbr></p>"},
	{"3", "<blockquote data-block=\"0\"><p data-block=\"0\">foo<wbr></p></blockquote>", "<blockquote data-block=\"0\"><p data-block=\"0\">foo<wbr></p></blockquote>"},
	{"2", "<p data-block=\"0\"><span data-type=\"html-inline\" class=\"vditor-ir__node\"><span class=\"vditor-ir__marker vditor-ir__marker--bi\">*</span><em data-newline=\"1\">foo</em><span class=\"vditor-ir__marker vditor-ir__marker--bi\">*</span></span></p>", "<p data-block=\"0\"><span data-type=\"em\" class=\"vditor-ir__node\"><span class=\"vditor-ir__marker vditor-ir__marker--bi\">*</span><em data-newline=\"1\">foo</em><span class=\"vditor-ir__marker vditor-ir__marker--bi\">*</span></span></p>"},
	{"1", "<p data-block=\"0\">f<wbr></p><p data-block=\"0\">bar</p>", "<p data-block=\"0\">f<wbr></p><p data-block=\"0\">bar</p>"},
	{"0", "<p data-block=\"0\">foo</p><p data-block=\"0\"><wbr><br></p>", "<p data-block=\"0\">foo</p><p data-block=\"0\"><wbr></p>"},
}

func TestSpinVditorIRDOM(t *testing.T) {
	luteEngine := lute.New()
	luteEngine.SetVditorIR(true)
	luteEngine.ParseOptions.ToC = true
	luteEngine.RenderOptions.Sanitize = true
	luteEngine.SetMark(true)
	luteEngine.SetSup(true)
	luteEngine.SetSub(true)

	for _, test := range spinVditorIRDOMTests {
		html := luteEngine.SpinVditorIRDOM(test.from)
		if test.to != html {
			t.Fatalf("test case [%s] failed\nexpected\n\t%q\ngot\n\t%q\noriginal html\n\t%q", test.name, test.to, html, test.from)
		}
	}
}
