Subramanya Sastry has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/50377


Change subject: Additional tests to catch future Parsoid regressions.
......................................................................

Additional tests to catch future Parsoid regressions.

Change-Id: I1fd9bb201983769d19c1b8fd5a5422f89258722c
---
M tests/parser/parserTests.txt
1 file changed, 24 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/77/50377/1

diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index df8b9e2..d63fb3b 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -2648,6 +2648,21 @@
 </p>
 !! end
 
+!!test
+Text in square brackets that is not a link should parse as text
+!!input
+[foo]
+[{{echo|foo}}]
+[url={{echo|foo}}]
+[url=http://example.com]
+!!result
+<p>[foo]
+[foo]
+[url=foo]
+[url=<a rel="nofollow" class="external free" 
href="http://example.com";>http://example.com</a>]
+</p>
+!!end
+
 !! test
 URL-encoding in URL functions (single parameter)
 !! input
@@ -7050,6 +7065,15 @@
 </p>
 !!end
 
+!!test
+Parsoid: Image caption containing leading space
+(The leading space should not trigger nowiki escaping in wt2wt mode)
+!! input
+[[Image:Foobar.jpg|thumb| bar]]
+!! result
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a 
href="/wiki/File:Foobar.jpg" class="image"><img alt="" 
src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg"; 
width="180" height="20" class="thumbimage" 
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>  
<div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" 
class="internal" title="Enlarge"><img 
src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" 
/></a></div>bar</div></div></div>
+
+!!end
 
 !! test
 Bug 3090: External links other than http: in image captions

-- 
To view, visit https://gerrit.wikimedia.org/r/50377
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fd9bb201983769d19c1b8fd5a5422f89258722c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to