Cscott has uploaded a new change for review.
https://gerrit.wikimedia.org/r/76821
Change subject: Add new parserTests for image attributes coming from templates.
......................................................................
Add new parserTests for image attributes coming from templates.
Bug: 49400
Change-Id: I49e92f5ddf9ee32347e6b738329f16f9ca129888
---
M tests/parser/parserTests.txt
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/21/76821/1
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index e7cd420..0b5e873 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -127,6 +127,13 @@
!! endarticle
!! article
+Template:image_attribs
+!! text
+<noinclude>
+[[File:foobar.jpg|</noinclude>right||Caption text<noinclude>]]</noinclude>
+!! endarticle
+
+!! article
A?b
!! text
Weirdo titles!
@@ -7882,6 +7889,15 @@
!! end
!! test
+Image with attributes from template.
+!! input
+[[Image:foobar.jpg|{{image_attribs}}]]
+!! result
+<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"
title="Caption text"><img alt="Caption text"
src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220"
/></a></div>
+
+!! end
+
+!! test
Image with link tails
!! input
123[[Image:foobar.jpg]]456
--
To view, visit https://gerrit.wikimedia.org/r/76821
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I49e92f5ddf9ee32347e6b738329f16f9ca129888
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits