Update parser tests for new heading HTML

Bug: T13555
Depends-On: I1180169a8e83af834c2984ba16089e6277f2a8dd
Change-Id: I4d2be132e63aff7bf8953f0f371e806a834db10d
This commit is contained in:
Bartosz Dziewoński 2022-11-24 13:49:11 +01:00 committed by jenkins-bot
parent 7c41511282
commit c6b1f32dff

View file

@ -429,13 +429,18 @@ parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
!! test !! test
Scribunto: expandTemplate with headers Scribunto: expandTemplate with headers
!! options !! options
parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } parsoid={ "modes": ["wt2html","wt2wt"] }
!! config
wgParserEnableLegacyHeadingDOM=false
!! wikitext !! wikitext
==foo== ==foo==
{{#invoke:test|testExpandTemplateWithHeaders}} {{#invoke:test|testExpandTemplateWithHeaders}}
!! html !! html/php
<h2><span class="mw-headline" id="foo">foo</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: foo">edit</a><span class="mw-editsection-bracket">]</span></span></h2> <div class="mw-heading mw-heading2"><h2 id="foo">foo</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: foo">edit</a><span class="mw-editsection-bracket">]</span></span></div>
<h2><span class="mw-headline" id="bar">bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Scribunto_template_with_headers&amp;action=edit&amp;section=T-1" title="Edit section: bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2> <div class="mw-heading mw-heading2"><h2 id="bar">bar</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Scribunto_template_with_headers&amp;action=edit&amp;section=T-1" title="Edit section: bar">edit</a><span class="mw-editsection-bracket">]</span></span></div>
!! html/parsoid
<h2 id="foo">foo</h2>
<h2 typeof="mw:Transclusion" id="bar" data-mw='{"parts":[{"template":{"target":{"wt":"#invoke:test","function":"invoke"},"params":{"1":{"wt":"testExpandTemplateWithHeaders"}},"i":0}}]}'>bar</h2>
!! end !! end
!! test !! test