diff options
Diffstat (limited to 'tests/parser/headings.txt')
-rw-r--r-- | tests/parser/headings.txt | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/tests/parser/headings.txt b/tests/parser/headings.txt index 3fc79058979e..2b9590376cc8 100644 --- a/tests/parser/headings.txt +++ b/tests/parser/headings.txt @@ -3032,3 +3032,80 @@ wgParserEnableLegacyHeadingDOM=false Sections: h3 index:T-1 toclevel:1 number:1 title:Template:With_one off:NULL anchor/linkAnchor:in line:in !! end + +!! test +Editable headings can only have trailing comments and whitespace +!! config +wgParserEnableLegacyHeadingDOM=false +!! options +showtocdata +parsoid={ + "wrapSections": true +} +!! wikitext +==== test ==== +yup + +==== hi ho ====<noinclude> +nope +</noinclude> + +==== test 2 ==== +another yup + +<!-- well -->==== ha ha ==== +back to nope + +==== he he ==== <!-- but this is ok --> +see +!! metadata +Sections: + h4 index:1 toclevel:1 number:1 title:Parser_test off:0 anchor/linkAnchor:test line:test + h4 index: toclevel:1 number:2 title:NULL off:NULL anchor/linkAnchor:hi_ho line:hi ho + h4 index:2 toclevel:1 number:3 title:Parser_test off:66 anchor/linkAnchor:test_2 line:test 2 + h4 index: toclevel:1 number:4 title:NULL off:NULL anchor/linkAnchor:ha_ha line:ha ha + h4 index:3 toclevel:1 number:5 title:Parser_test off:139 anchor/linkAnchor:he_he line:he he +!! html/php +<div id="toc" class="toc" role="navigation" aria-labelledby="mw-toc-heading"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2 id="mw-toc-heading">Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div> +<ul> +<li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext">test</span></a></li> +<li class="toclevel-1"><a href="#hi_ho"><span class="tocnumber">2</span> <span class="toctext">hi ho</span></a></li> +<li class="toclevel-1 tocsection-2"><a href="#test_2"><span class="tocnumber">3</span> <span class="toctext">test 2</span></a></li> +<li class="toclevel-1"><a href="#ha_ha"><span class="tocnumber">4</span> <span class="toctext">ha ha</span></a></li> +<li class="toclevel-1 tocsection-3"><a href="#he_he"><span class="tocnumber">5</span> <span class="toctext">he he</span></a></li> +</ul> +</div> + +<div class="mw-heading mw-heading4"><h4 id="test">test</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: test">edit</a><span class="mw-editsection-bracket">]</span></span></div> +<p>yup +</p> +<div class="mw-heading mw-heading4"><h4 id="hi_ho">hi ho</h4></div> +<p>nope +</p><p><br /> +</p> +<div class="mw-heading mw-heading4"><h4 id="test_2">test 2</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: test 2">edit</a><span class="mw-editsection-bracket">]</span></span></div> +<p>another yup +</p> +<div class="mw-heading mw-heading4"><h4 id="ha_ha">ha ha</h4></div> +<p>back to nope +</p> +<div class="mw-heading mw-heading4"><h4 id="he_he">he he</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: he he">edit</a><span class="mw-editsection-bracket">]</span></span></div> +<p>see +</p> +!! html/parsoid +<section data-mw-section-id="0"><meta property="mw:PageProp/toc" data-mw='{"autoGenerated":true}'/></section><section data-mw-section-id="1"><h4 id="test">test</h4> +<p>yup</p> + +</section><section data-mw-section-id="-1"><h4 id="hi_ho">hi ho</h4><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/> +<p>nope</p> +<meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/> + +</section><section data-mw-section-id="2"><h4 id="test_2">test 2</h4> +<p>another yup</p> + +<!-- well --></section><section data-mw-section-id="-1"><h4 id="ha_ha">ha ha</h4> +<p>back to nope</p> + +</section><section data-mw-section-id="3"><h4 id="he_he">he he</h4> <!-- but this is ok --> +<p>see</p></section> +!! end |