aboutsummaryrefslogtreecommitdiffstats
path: root/tests/parser
diff options
context:
space:
mode:
authorBrian Wolff <bawolff+wn@gmail.com>2014-06-23 17:45:41 -0300
committerBrian Wolff <bawolff+wn@gmail.com>2014-06-23 19:45:31 -0300
commitd7d8458bc0c0ffd2b93fcda35810809e83c1a26d (patch)
treec33c89d06520dccc56d7735de75255d77a909864 /tests/parser
parent3fd9ff66f5718de594e567fd55285740e84faf9e (diff)
downloadmediawikicore-d7d8458bc0c0ffd2b93fcda35810809e83c1a26d.tar.gz
mediawikicore-d7d8458bc0c0ffd2b93fcda35810809e83c1a26d.zip
Allow fragments in link= parameter in <gallery> tags.
This brings the image syntax in gallery tags inline with normal syntax. Handle <gallery>File:foo.png|link=bar#baz</gallery> properly. Bug: 62343 Change-Id: If6149ccc19f70605ad4481e4da2ca55676d6001d
Diffstat (limited to 'tests/parser')
-rw-r--r--tests/parser/parserTests.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index c447a44c53aa..b3e9c511fd83 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -15135,6 +15135,37 @@ image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
!! end
!! test
+Gallery with link that has fragment
+!! wikitext
+<gallery>
+image:foobar.jpg|link=Main_Page
+image:foobar.jpg|link=Main_Page#section
+image:foobar.jpg|link=Main Page#section|caption
+</gallery>
+!! html
+<ul class="gallery mw-gallery-traditional">
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
+ <div class="gallerytext">
+<p>caption
+</p>
+ </div>
+ </div></li>
+</ul>
+
+!! end
+
+!! test
Gallery with wikitext inside caption
!! wikitext
<gallery>