| 1 |
!! Version 2 |
| 2 |
|
| 3 |
!! test |
| 4 |
PageImages with one image |
| 5 |
!! options |
| 6 |
property=page_image_free |
| 7 |
!! config |
| 8 |
wgParserEnableLegacyMediaDOM=false |
| 9 |
!! wikitext |
| 10 |
[[File:Foobar.jpg]] |
| 11 |
!! metadata |
| 12 |
property[page_image_free]=Foobar.jpg |
| 13 |
!! html |
| 14 |
<p><span class="mw-default-size" typeof="mw:File"><a href="/wiki/File:Foobar.jpg" class="mw-file-description"><img src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="mw-file-element" /></a></span> |
| 15 |
</p> |
| 16 |
!! end |
| 17 |
|
| 18 |
!! test |
| 19 |
PageImages with two images |
| 20 |
!! options |
| 21 |
property=page_image_free |
| 22 |
!! config |
| 23 |
wgParserEnableLegacyMediaDOM=false |
| 24 |
!! wikitext |
| 25 |
[[File:Thumb.png]] |
| 26 |
[[File:Foobar.jpg]] |
| 27 |
!! metadata |
| 28 |
property[page_image_free]=Foobar.jpg |
| 29 |
!! html |
| 30 |
<p><span class="mw-default-size" typeof="mw:File"><a href="/wiki/File:Thumb.png" class="mw-file-description"><img src="http://example.com/images/e/ea/Thumb.png" decoding="async" width="135" height="135" class="mw-file-element" /></a></span> |
| 31 |
<span class="mw-default-size" typeof="mw:File"><a href="/wiki/File:Foobar.jpg" class="mw-file-description"><img src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="mw-file-element" /></a></span> |
| 32 |
</p> |
| 33 |
!! end |
| 34 |
|
| 35 |
!! test |
| 36 |
PageImages with best excluded by wgPageImagesLeadSectionOnly |
| 37 |
!! options |
| 38 |
property=page_image_free |
| 39 |
!! config |
| 40 |
wgParserEnableLegacyMediaDOM=false |
| 41 |
wgParserEnableLegacyHeadingDOM=false |
| 42 |
!! metadata |
| 43 |
property[page_image_free]=Thumb.png |
| 44 |
!! wikitext |
| 45 |
[[File:Thumb.png]] |
| 46 |
|
| 47 |
== Section == |
| 48 |
|
| 49 |
[[File:Foobar.jpg]] |
| 50 |
!! html |
| 51 |
<p><span class="mw-default-size" typeof="mw:File"><a href="/wiki/File:Thumb.png" class="mw-file-description"><img src="http://example.com/images/e/ea/Thumb.png" decoding="async" width="135" height="135" class="mw-file-element" /></a></span> |
| 52 |
</p> |
| 53 |
<div class="mw-heading mw-heading2"><h2 id="Section">Section</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section">edit</a><span class="mw-editsection-bracket">]</span></span></div> |
| 54 |
<p><span class="mw-default-size" typeof="mw:File"><a href="/wiki/File:Foobar.jpg" class="mw-file-description"><img src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="mw-file-element" /></a></span> |
| 55 |
</p> |
| 56 |
!! end |
| 57 |
|
| 58 |
!! test |
| 59 |
PageImages with toc and image in heading |
| 60 |
!! options |
| 61 |
property=page_image_free |
| 62 |
!! config |
| 63 |
wgParserEnableLegacyMediaDOM=false |
| 64 |
wgParserEnableLegacyHeadingDOM=false |
| 65 |
!! wikitext |
| 66 |
__TOC__ |
| 67 |
== Hello [[File:Foobar.jpg]] == |
| 68 |
!! metadata |
| 69 |
property[page_image_free]=Foobar.jpg |
| 70 |
!! html |
| 71 |
<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> |
| 72 |
<ul> |
| 73 |
<li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext">Hello</span></a></li> |
| 74 |
</ul> |
| 75 |
</div> |
| 76 |
|
| 77 |
<div class="mw-heading mw-heading2"><h2 id="Hello">Hello <span class="mw-default-size" typeof="mw:File"><a href="/wiki/File:Foobar.jpg" class="mw-file-description"><img src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="mw-file-element" /></a></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Hello">edit</a><span class="mw-editsection-bracket">]</span></span></div> |
| 78 |
!! end |