diff options
author | C. Scott Ananian <cscott@cscott.net> | 2025-04-04 23:12:24 -0400 |
---|---|---|
committer | C. Scott Ananian <cscott@cscott.net> | 2025-04-04 23:12:44 -0400 |
commit | 2ea61f9aa47399544c308ca95b3941b20d26e74c (patch) | |
tree | 9de8f8d1d0560b1f79d0611fcbed8fba4047c4b2 | |
parent | 646a3f381883aeb685ccee19fbc94abd8aad7f47 (diff) | |
download | mediawikicore-2ea61f9aa47399544c308ca95b3941b20d26e74c.tar.gz mediawikicore-2ea61f9aa47399544c308ca95b3941b20d26e74c.zip |
Sync up core repo with Parsoid
This now aligns with Parsoid commit 0965c908f046d659aab16b4023cc8de9ded1fce7
Change-Id: Ic007c7b4a893329de8499a88bb0edcb4b04d0905
-rw-r--r-- | tests/parser/headings.txt | 77 | ||||
-rw-r--r-- | tests/parser/pWrapping.txt | 10 | ||||
-rw-r--r-- | tests/parser/parserTests.txt | 88 | ||||
-rw-r--r-- | tests/parser/preTags.txt | 2 | ||||
-rw-r--r-- | tests/parser/tables.txt | 38 |
5 files changed, 196 insertions, 19 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 diff --git a/tests/parser/pWrapping.txt b/tests/parser/pWrapping.txt index 95824fe66535..dd7956eae35c 100644 --- a/tests/parser/pWrapping.txt +++ b/tests/parser/pWrapping.txt @@ -394,3 +394,13 @@ it's off to work we go <p>it's off to work we go</p> !! end + +!! test +Extlink on a line with a block gets wrapped +!! wikitext +[https://google.com {{1x|foo}}] bar <div>foo</div> +!! html/php +<p><a rel="nofollow" class="external text" href="https://google.com">foo</a> bar </p><div>foo</div> +!! html/parsoid +<p><a rel="mw:ExtLink nofollow" href="https://google.com" class="external text"><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"1x","href":"./Template:1x"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span></a> bar </p><div data-parsoid='{"stx":"html"}'>foo</div> +!! end diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 666f878045f9..f50b8d0cabb0 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -1651,6 +1651,29 @@ parsoid=wt2html !! end !! test +Non-wikilinks should not be treated as broken wikilinks +!! options +parsoid=wt2html +!! wikitext +{{1x|[[1],[2]]}} + +{{1x|[[{}]]}} + +{{1x|[[1, [[2, 3]], 4]]}} +!! html/php +<p>[[1],[2]] +</p><p>[[{}]] +</p><p>[[1, <a href="/index.php?title=2,_3&action=edit&redlink=1" class="new" title="2, 3 (page does not exist)">2, 3</a>, 4]] +</p> +!! html/parsoid +<p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"1x","href":"./Template:1x"},"params":{"1":{"wt":"[[1],[2]]"}},"i":0}}]}'>[[1],[2]]</span></p> + +<p><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"1x","href":"./Template:1x"},"params":{"1":{"wt":"[[{}]]"}},"i":0}}]}'>[[{}]]</span></p> + +<p><span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"1x","href":"./Template:1x"},"params":{"1":{"wt":"[[1, [[2, 3]], 4]]"}},"i":0}}]}'>[[1, </span><a rel="mw:WikiLink" href="./2,_3?action=edit&redlink=1" title="2, 3" class="new" typeof="mw:LocalizedAttrs" data-mw-i18n='{"title":{"lang":"x-page","key":"red-link-title","params":["2, 3"]}}'>2, 3</a><span>, 4]]</span></p> +!! end + +!! test Wikilinks with embedded newlines are not broken !! wikitext {{1x|[[ Foo @@ -3062,6 +3085,18 @@ Wikilink in wikilink <p>[[Hi|<a rel="mw:WikiLink" href="./Ho" title="Ho" data-parsoid='{"stx":"simple","a":{"href":"./Ho"},"sa":{"href":"Ho"}}'>Ho</a>]]</p> !! end +!! test +Category in wikilink +!! options +parsoid=wt2html +!! wikitext +[[Hi|Ho[[Category:Hiho]]]] +!! html/php +<p>[[Hi|Ho]] +</p> +!! html/parsoid +<p>[[Hi|Ho<link rel="mw:PageProp/Category" href="./Category:Hiho"/>]]</p> +!! end !! test Parsoid-specific test: Wikilinks with should RT properly @@ -5478,28 +5513,38 @@ parsoid=wt2html !! test Table wikitext syntax outside wiki-tables +!! options +parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } !! wikitext a |+ not a caption -! not a table heading +! not a table heading!! neither is this |- not a table row -| not a table cell +| not a table cell || neither is this | class="foo bar" | baz b |} |- c +|- +{{1x|!a!!b}} +|- +{{1x|{{!}}a {{!}}{{!}}b}} !! html <p>a |+ not a caption -! not a table heading +! not a table heading!! neither is this |- not a table row -| not a table cell +| not a table cell || neither is this | class="foo bar" | baz b |} |- c +|- +!a!!b +|- +|a ||b </p> !! end @@ -7610,6 +7655,7 @@ Parsoid: Defaultsort <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"DEFAULTSORT:Foo","function":"defaultsort"},"params":{},"i":0}}]}'></span> !! end +# See also T391062 for parsoid-native default sort. !! test Parsoid: Defaultsort variations (T236846) !! wikitext @@ -9827,6 +9873,8 @@ Article for special page transclusion test !! test Special page transclusion +!! config +wgParsoidFragmentSupport="v3" !! wikitext {{Special:Prefixindex/Xyzzyx}} !! html/php @@ -9840,6 +9888,8 @@ Special page transclusion !! test Special page transclusion twice (T7021) +!! config +wgParsoidFragmentSupport="v3" !! wikitext {{Special:Prefixindex/Xyzzyx}} {{Special:Prefixindex/Xyzzyx}} @@ -9866,7 +9916,7 @@ Template:Nested special !! test Nested special page transclusion !! config -wgParsoidFragmentSupport="v2" +wgParsoidFragmentSupport="v3" !! wikitext {{nested special}} !! html/php @@ -10804,13 +10854,15 @@ parsoid=html2wt !! test Special:Search page linking. +!! config +wgParsoidFragmentSupport="v3" !! wikitext {{Special:search}} !! html/php <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a> </p> !! html/parsoid+integrated -<p><a href="/wiki/Special:Search" title="Special:Search" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Special:search","href":"./Special:Search"},"params":{},"i":0}}]}'>Special:Search</a></p> +<p><a rel="mw:WikiLink" href="./Special:Search" title="Special:Search" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Special:search","href":"./Special:Search"},"params":{},"i":0}}]}'>Special:Search</a></p> !! end !! test @@ -10903,7 +10955,7 @@ parsoid=wt2html </p><p>{{ Main Page|Something else }} </p> !! html/parsoid -<p><a rel="mw:WikiLink" href="./Template:Main_Page?action=edit&redlink=1" title="Template:Main Page" about="#mwt1" typeof="mw:Transclusion mw:LocalizedAttrs" class="new" data-parsoid='{"stx":"simple","a":{"href":"./Template:Main_Page"},"sa":{"href":"Template:Main_Page"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"Main Page","href":"./Template:Main_Page"},"params":{"1":{"wt":"Something else "}},"i":0}}]}' data-mw-i18n='{"title":{"lang":"x-page","key":"red-link-title","params":["Template:Main Page"]}}'>Template:Main_Page</a></p> +<p><a rel="mw:WikiLink" href="./Template:Main_Page?action=edit&redlink=1" title="Template:Main Page" about="#mwt1" typeof="mw:Transclusion mw:LocalizedAttrs" class="new" data-parsoid='{"stx":"simple","a":{"href":"./Template:Main_Page"},"sa":{"href":"Template:Main_Page"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"Main Page","href":"./Template:Main_Page"},"params":{"1":{"wt":"Something else "}},"i":0}}]}' data-mw-i18n='{"title":{"lang":"x-page","key":"red-link-title","params":["Template:Main Page"]}}'>Template:Main Page</a></p> <p>{{ <span about="#mwt5" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"T290526","href":"./Template:T290526"},"params":{},"i":0}}]}'>Main Page|Something else</span> }}</p> !! end @@ -17098,9 +17150,9 @@ parsoid=wt2html z !! html/parsoid -<p><i about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"<sealtag>y</sealtag>":null},"sa":{"<sealtag>y</sealtag>":""},"autoInsertedEnd":true}' data-mw='{"attribs":[[{"txt":"","html":"<span about=\"#mwt2\" typeof=\"mw:Extension/sealtag\" data-parsoid='{\"src\":\"&lt;sealtag>y&lt;/sealtag>\"}' data-mw='{\"name\":\"sealtag\",\"attrs\":{},\"body\":{\"extsrc\":\"y\"}}'></span>"},{"html":""}]]}'></i></p><i about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"<sealtag>y</sealtag>":null},"sa":{"<sealtag>y</sealtag>":""},"autoInsertedStart":true,"autoInsertedEnd":true}' data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'> +<p><i about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"<sealtag>y</sealtag>":null},"sa":{"<sealtag>y</sealtag>":""},"autoInsertedEnd":true}' data-mw='{"attribs":[[{"txt":"","html":"<span about=\"#mwt2\" typeof=\"mw:Extension/sealtag\" data-parsoid='{\"src\":\"&lt;sealtag>y&lt;/sealtag>\"}' data-mw='{\"name\":\"sealtag\",\"attrs\":{},\"body\":{\"extsrc\":\"y\"}}'></span>"},{"html":""}]]}'></i></p> -<p>z</p></i> +<p><i about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"<sealtag>y</sealtag>":null},"sa":{"<sealtag>y</sealtag>":""},"autoInsertedStart":true,"autoInsertedEnd":true}' data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>z</i></p> !! end !! test @@ -17112,9 +17164,9 @@ parsoid=wt2html z !! html/parsoid -<p><i title="" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":""},"sa":{"title":"<sealtag>y</sealtag>"},"autoInsertedEnd":true}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<span about=\"#mwt2\" typeof=\"mw:Extension/sealtag\" data-parsoid='{\"src\":\"&lt;sealtag>y&lt;/sealtag>\"}' data-mw='{\"name\":\"sealtag\",\"attrs\":{},\"body\":{\"extsrc\":\"y\"}}'></span>"}]]}'>a</i></p><i title="" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":""},"sa":{"title":"<sealtag>y</sealtag>"},"autoInsertedStart":true,"autoInsertedEnd":true}' data-mw='{"attribs":[[{"txt":"title"},{"html":""}]]}'> +<p><i title="" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":""},"sa":{"title":"<sealtag>y</sealtag>"},"autoInsertedEnd":true}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<span about=\"#mwt2\" typeof=\"mw:Extension/sealtag\" data-parsoid='{\"src\":\"&lt;sealtag>y&lt;/sealtag>\"}' data-mw='{\"name\":\"sealtag\",\"attrs\":{},\"body\":{\"extsrc\":\"y\"}}'></span>"}]]}'>a</i></p> -<p>z</p></i> +<p><i title="" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":""},"sa":{"title":"<sealtag>y</sealtag>"},"autoInsertedStart":true,"autoInsertedEnd":true}' data-mw='{"attribs":[[{"txt":"title"},{"html":""}]]}'>z</i></p> !! end !! test @@ -17187,7 +17239,7 @@ Include directive string gluing !! test Extension tag contents using isRawHTML flag !! config -wgParsoidFragmentSupport="v2" +wgParsoidFragmentSupport="v3" !! options language=zh !! wikitext @@ -17222,7 +17274,7 @@ But with isRawHTML the result is left alone: !! test Parser function contents using isRawHTML flag !! config -wgParsoidFragmentSupport="v2" +wgParsoidFragmentSupport="v3" !! options language=zh !! wikitext @@ -17252,7 +17304,7 @@ But with isRawHTML the result is left alone: !! test Handling of nowiki strip markers in Parsoid fragments !! config -wgParsoidFragmentSupport="v2" +wgParsoidFragmentSupport="v3" !! options parsoid=wt2html !! wikitext @@ -17265,13 +17317,13 @@ Parser function: {{#spantag:<nowiki>a &amp; <b>c</b></nowiki>}} </p> !! html/parsoid+integrated <p>Extension tag: <span typeof="mw:Extension/spantag" data-mw='{"name":"spantag","attrs":{},"body":{"extsrc":"<nowiki>a &amp;amp; <b>c</b></nowiki>"}}'>a <span typeof="mw:Entity">&</span>amp; <b>c</b></span></p> -<p>Parser function: <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"#spantag:<nowiki>a &amp;amp; <b>c</b></nowiki>","function":"spantagpf"},"params":{},"i":0}}]}'>a <span typeof="mw:Entity">&</span>amp; <b>c</b></span></p> +<p>Parser function: <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"#spantag:<nowiki>a &amp;amp; <b>c</b></nowiki>","function":"spantagpf"},"params":{},"i":0}}]}'>a &amp; <b>c</b></span></p> !! end !! test Handling of nested nowiki strip markers in Parsoid fragments (1) !! config -wgParsoidFragmentSupport="v2" +wgParsoidFragmentSupport="v3" !! wikitext Text {{#spantag:text <spantag>more text</spantag>}} !! html/php @@ -17284,7 +17336,7 @@ Text {{#spantag:text <spantag>more text</spantag>}} !! test Handling of nested nowiki strip markers in Parsoid fragments (2) !! config -wgParsoidFragmentSupport="v2" +wgParsoidFragmentSupport="v3" !! wikitext Text {{#spantag:<nowiki><b></nowiki> {{#spantag:<nowiki><c></nowiki>}}}} !! html/php @@ -17297,7 +17349,7 @@ Text {{#spantag:<nowiki><b></nowiki> {{#spantag:<nowiki><c></nowiki>}}}} !! test T386233: suppress <nowiki/> tags between extension tags !! config -wgParsoidFragmentSupport="v2" +wgParsoidFragmentSupport="v3" !! wikitext Deliberately unclosed b tag triggers p-wrapping if a nowiki span is added between the divtags: diff --git a/tests/parser/preTags.txt b/tests/parser/preTags.txt index adf38fbb57ff..81aa91541d83 100644 --- a/tests/parser/preTags.txt +++ b/tests/parser/preTags.txt @@ -80,7 +80,7 @@ Entities inside <pre> !! html/parsoid+standalone <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre> !! html/parsoid+integrated -<pre about="#mwt1" typeof="mw:Extension/pre mw:Transclusion" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"Foo <nowiki>&rarr;bar</nowiki>"},"parts":[{"template":{"target":{"wt":"#tag:pre","function":"tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo →bar</pre> +<pre about="#mwt1" typeof="mw:Extension/pre mw:Transclusion" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"Foo &rarr;bar"},"parts":[{"template":{"target":{"wt":"#tag:pre","function":"tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo →bar</pre> !! end ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that diff --git a/tests/parser/tables.txt b/tests/parser/tables.txt index 5c9439d993c5..7d5e2af0712d 100644 --- a/tests/parser/tables.txt +++ b/tests/parser/tables.txt @@ -313,6 +313,24 @@ A table with captions with non-default spaced attributes and a table row !! end !! test +Multi-line captions in tables +!! wikitext +{| +|+line 1 of caption +line 2 of caption +|data +|} +!! html +<table> +<caption>line 1 of caption +line 2 of caption +</caption> +<tbody><tr> +<td>data +</td></tr></tbody></table> +!! end + +!! test Table td-cell syntax variations !! wikitext {| @@ -1980,3 +1998,23 @@ parsoid=wt2html,wt2wt </tbody> </table> !! end + +!! test +Multiline inline table line in file caption +!! wikitext +[[File:Foobar.jpg|thumb| +{| +| +asdf +|} +]] +!! html/php +<figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Foobar.jpg" class="mw-file-description"><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="mw-file-element" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a><figcaption> <table> <tbody><tr> <td> asdf </td></tr></tbody></table> </figcaption></figure> +!! html/parsoid +<figure class="mw-default-size" typeof="mw:File/Thumb"><a href="./File:Foobar.jpg" class="mw-file-description"><img resource="./File:Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="20" width="180" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" class="mw-file-element"/></a><figcaption> +<table> +<tbody><tr><td> +asdf</td></tr> +</tbody></table> +</figcaption></figure> +!! end |