Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339544 )

Change subject: T156296: Reorder "thumb" before "thumbnail" in the enwiki 
baseconfig
......................................................................

T156296: Reorder "thumb" before "thumbnail" in the enwiki baseconfig

Change-Id: I885ab8ef245d7ec47c4607a16ed8e717f7ca99a7
---
M lib/config/baseconfig/enwiki.json
M tests/parserTests-blacklist.js
M tests/parserTests.txt
3 files changed, 38 insertions(+), 42 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/44/339544/1

diff --git a/lib/config/baseconfig/enwiki.json 
b/lib/config/baseconfig/enwiki.json
index 524e179..642da03 100644
--- a/lib/config/baseconfig/enwiki.json
+++ b/lib/config/baseconfig/enwiki.json
@@ -538,8 +538,8 @@
       {
         "name": "img_thumbnail",
         "aliases": [
-          "thumbnail",
-          "thumb"
+          "thumb",
+          "thumbnail"
         ],
         "case-sensitive": ""
       },
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 93087ee..3baf5ee 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -457,12 +457,12 @@
 add("html2html", "{{#speciale:}} page name, unknown", "<p 
data-parsoid='{\"dsr\":[0,26,0,0]}'>Special:Foobar_nonexistent</p>");
 add("html2html", "Allow empty links in image captions (T62753)", "<figure 
class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" 
data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumb\"},{\"ck\":\"caption\",\"ak\":\"Caption
 
[[Link1]]\\n&lt;nowiki>[[]]&lt;/nowiki>\\n[[Link2]]\\n\"}],\"dsr\":[0,76,2,2]}'><a
 href=\"./File:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[2,null,null,null]}'><img
 resource=\"./File:Foobar.jpg\" 
src=\"//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg\" 
data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" 
height=\"25\" width=\"220\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"25\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a><figcaption
 data-parsoid='{\"dsr\":[null,74,null,null]}'>Caption <a rel=\"mw:WikiLink\" 
href=\"./Link1\" title=\"Link1\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link1\"},\"sa\":{\"href\":\"Link1\"},\"dsr\":[32,41,2,2]}'>Link1</a>\n<span
 typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[42,63,8,9]}'>[[]]</span>\n<a 
rel=\"mw:WikiLink\" href=\"./Link2\" title=\"Link2\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link2\"},\"sa\":{\"href\":\"Link2\"},\"dsr\":[64,73,2,2]}'>Link2</a>\n</figcaption></figure>");
 add("html2html", "Image with multiple attributes from the same template", 
"<figure class=\"mw-default-size mw-halign-right\" typeof=\"mw:Image\" 
data-parsoid='{\"optList\":[{\"ck\":\"right\",\"ak\":\"right\"},{\"ck\":\"caption\",\"ak\":\"Caption
 text\"}],\"dsr\":[0,38,2,2]}'><a href=\"./File:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[2,null,null,null]}'><img
 resource=\"./File:Foobar.jpg\" src=\"//example.com/images/3/3a/Foobar.jpg\" 
data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" 
height=\"220\" width=\"1941\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"220\",\"width\":\"1941\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a><figcaption
 data-parsoid='{\"dsr\":[null,36,null,null]}'>Caption 
text</figcaption></figure>\n");
-add("html2html", "Image with link tails", "<p 
data-parsoid='{\"dsr\":[0,29,0,0]}'>123<span class=\"mw-default-size\" 
typeof=\"mw:Image\" data-parsoid='{\"optList\":[],\"dsr\":[3,22,null,null]}'><a 
href=\"./File:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"}}'><img
 resource=\"./File:Foobar.jpg\" src=\"//example.com/images/3/3a/Foobar.jpg\" 
data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" 
height=\"220\" width=\"1941\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"220\",\"width\":\"1941\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a></span>456\n123</p>\n<figure
 class=\"mw-default-size mw-halign-right\" typeof=\"mw:Image\" 
data-parsoid='{\"optList\":[{\"ck\":\"right\",\"ak\":\"right\"}],\"dsr\":[30,55,2,2]}'><a
 href=\"./File:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[32,53,null,null]}'><img
 resource=\"./File:Foobar.jpg\" src=\"//example.com/images/3/3a/Foobar.jpg\" 
data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" 
height=\"220\" width=\"1941\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"220\",\"width\":\"1941\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a></figure>\n<p
 data-parsoid='{\"dsr\":[56,63,0,0]}'>456\n123</p>\n<figure 
class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" 
data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumb\"}],\"dsr\":[64,89,2,2]}'><a
 href=\"./File:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[66,87,null,null]}'><img
 resource=\"./File:Foobar.jpg\" 
src=\"//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg\" 
data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" 
height=\"25\" width=\"220\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"25\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a></figure>\n<p
 data-parsoid='{\"dsr\":[90,93,0,0]}'>456</p>\n");
+add("html2html", "Image with link tails", "<p 
data-parsoid='{\"dsr\":[0,29,0,0]}'>123<span class=\"mw-default-size\" 
typeof=\"mw:Image\" data-parsoid='{\"optList\":[],\"dsr\":[3,22,null,null]}'><a 
href=\"./File:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"}}'><img
 resource=\"./File:Foobar.jpg\" src=\"//example.com/images/3/3a/Foobar.jpg\" 
data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" 
height=\"220\" width=\"1941\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"220\",\"width\":\"1941\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a></span>456\n123</p>\n<figure
 class=\"mw-default-size mw-halign-right\" typeof=\"mw:Image\" 
data-parsoid='{\"optList\":[{\"ck\":\"right\",\"ak\":\"right\"}],\"dsr\":[30,55,2,2]}'><a
 href=\"./File:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[32,53,null,null]}'><img
 resource=\"./File:Foobar.jpg\" src=\"//example.com/images/3/3a/Foobar.jpg\" 
data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" 
height=\"220\" width=\"1941\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"220\",\"width\":\"1941\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a></figure>\n<p
 data-parsoid='{\"dsr\":[56,63,0,0]}'>456\n123</p>\n<figure 
class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" 
data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumbnail\"}],\"dsr\":[64,93,2,2]}'><a
 href=\"./File:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[66,91,null,null]}'><img
 resource=\"./File:Foobar.jpg\" 
src=\"//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg\" 
data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" 
height=\"25\" width=\"220\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"25\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a></figure>\n<p
 data-parsoid='{\"dsr\":[94,97,0,0]}'>456</p>\n");
 add("html2html", "Image with link parameter, wgNoFollowLinks set to false", 
"<p data-parsoid='{\"dsr\":[0,41,0,0]}'><img 
src=\"http://example.com/images/3/3a/Foobar.jpg\"; alt=\"Foobar.jpg\" 
rel=\"mw:externalImage\" data-parsoid='{\"dsr\":[0,41,null,null]}'/></p>\n");
 add("html2html", "Image with link parameter, wgNoFollowDomainExceptions", "<p 
data-parsoid='{\"dsr\":[0,41,0,0]}'><img 
src=\"http://example.com/images/3/3a/Foobar.jpg\"; alt=\"Foobar.jpg\" 
rel=\"mw:externalImage\" data-parsoid='{\"dsr\":[0,41,null,null]}'/></p>\n");
 add("html2html", "Link to image page- image page normally doesn't exists, 
hence edit link\nAdd test with existing image page\n#<p><a 
href=\"/wiki/File:Test\" title=\"Image:Test\">Image:test</a>", "<p 
data-parsoid='{\"dsr\":[0,61,0,0]}'>[/index.php?title=File:Test&amp;action=edit&amp;redlink=1
 Image:test]</p>\n");
 add("html2html", "T20784  Link to non-existent image page with caption should 
use caption as link text", "<p 
data-parsoid='{\"dsr\":[0,58,0,0]}'>[/index.php?title=File:Test&amp;action=edit&amp;redlink=1
 caption]</p>\n");
-add("html2html", "SVG thumbnails with invalid language code", "<figure 
class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" 
data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumb\"},{\"ck\":\"lang\",\"ak\":\"lang=invalid.language.code\"}],\"dsr\":[0,52,2,2]}'><a
 href=\"./File:Foobar.svg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.svg\"},\"sa\":{\"href\":\"File:Foobar.svg\"},\"dsr\":[2,50,null,null]}'><img
 resource=\"./File:Foobar.svg\" 
src=\"//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg\" 
lang=\"invalid.language.code\" data-file-width=\"240\" data-file-height=\"180\" 
data-file-type=\"drawing\" height=\"165\" width=\"220\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.svg\",\"lang\":\"invalid.language.code\",\"height\":\"165\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Foobar.svg\",\"lang\":\"lang=invalid.language.code\"}}'/></a></figure>\n");
+add("html2html", "SVG thumbnails with invalid language code", "<figure 
class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" 
data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumbnail\"},{\"ck\":\"lang\",\"ak\":\"lang=invalid.language.code\"}],\"dsr\":[0,56,2,2]}'><a
 href=\"./File:Foobar.svg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.svg\"},\"sa\":{\"href\":\"File:Foobar.svg\"},\"dsr\":[2,54,null,null]}'><img
 resource=\"./File:Foobar.svg\" 
src=\"//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg\" 
lang=\"invalid.language.code\" data-file-width=\"240\" data-file-height=\"180\" 
data-file-type=\"drawing\" height=\"165\" width=\"220\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.svg\",\"lang\":\"invalid.language.code\",\"height\":\"165\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Foobar.svg\",\"lang\":\"lang=invalid.language.code\"}}'/></a></figure>\n");
 add("html2html", "T93580: 3. Templated <ref> inside inline images", "<p 
data-parsoid='{\"dsr\":[0,98,0,0]}'><span class=\"mw-default-size\" 
typeof=\"mw:Image\" 
data-parsoid='{\"optList\":[{\"ck\":\"caption\",\"ak\":\"Undisplayed caption in 
inline image with ref: 
{{echo|&lt;ref>{{echo|foo}}&lt;/ref>}}\"}],\"dsr\":[0,98,null,null]}' 
data-mw='{\"caption\":\"Undisplayed caption in inline image with ref: &lt;span 
about=\\\"#mwt3\\\" class=\\\"mw-ref\\\" id=\\\"cite_ref-1\\\" 
rel=\\\"dc:references\\\" typeof=\\\"mw:Transclusion  mw:Extension/ref\\\" 
data-parsoid=&#39;{\\\"dsr\\\":[64,96,null,null],\\\"pi\\\":[[{\\\"k\\\":\\\"1\\\"}]]}&#39;
 
data-mw=&#39;{\\\"parts\\\":[{\\\"template\\\":{\\\"target\\\":{\\\"wt\\\":\\\"echo\\\",\\\"href\\\":\\\"./Template:Echo\\\"},\\\"params\\\":{\\\"1\\\":{\\\"wt\\\":\\\"&amp;lt;ref>{{echo|foo}}&amp;lt;/ref>\\\"}},\\\"i\\\":0}}]}&#39;>&lt;a
 href=\\\"./Main_Page#cite_note-1\\\" style=\\\"counter-reset: mw-Ref 1;\\\" 
data-parsoid=\\\"{}\\\">&lt;span class=\\\"mw-reflink-text\\\" 
data-parsoid=\\\"{}\\\">[1]&lt;/span>&lt;/a>&lt;/span>&lt;meta 
typeof=\\\"mw:Transclusion mw:Extension/ref/Marker\\\" about=\\\"#mwt3\\\" 
data-parsoid=&#39;{\\\"group\\\":\\\"\\\",\\\"name\\\":\\\"\\\",\\\"content\\\":\\\"foo\\\",\\\"hasRefInRef\\\":false,\\\"dsr\\\":[64,96,null,null],\\\"pi\\\":[[{\\\"k\\\":\\\"1\\\"}]]}&#39;
 
data-mw=&#39;{\\\"parts\\\":[{\\\"template\\\":{\\\"target\\\":{\\\"wt\\\":\\\"echo\\\",\\\"href\\\":\\\"./Template:Echo\\\"},\\\"params\\\":{\\\"1\\\":{\\\"wt\\\":\\\"&amp;lt;ref>{{echo|foo}}&amp;lt;/ref>\\\"}},\\\"i\\\":0}}]}&#39;/>\"}'><a
 href=\"./File:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"}}'><img
 resource=\"./File:Foobar.jpg\" src=\"//example.com/images/3/3a/Foobar.jpg\" 
data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" 
height=\"220\" width=\"1941\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"220\",\"width\":\"1941\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a></span></p>\n\n<ol
 class=\"mw-references\" typeof=\"mw:Extension/references\" about=\"#mwt7\" 
data-parsoid='{\"dsr\":[100,114,2,2]}' 
data-mw='{\"name\":\"references\",\"attrs\":{}}'><li about=\"#cite_note-1\" 
id=\"cite_note-1\"><a href=\"./Main_Page#cite_ref-1\" 
rel=\"mw:referencedBy\"><span class=\"mw-linkback-text\">↑ </span></a> <span 
id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text\" 
data-parsoid=\"{}\">foo</span></li></ol>");
 add("html2html", "Subpage link", "<p data-parsoid='{\"dsr\":[0,38,0,0]}'><a 
rel=\"mw:WikiLink\" href=\"./Wiki/Subpage_test/subpage\" title=\"Wiki/Subpage 
test/subpage\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Subpage_test/subpage\"},\"sa\":{\"href\":\"wiki/Subpage
 test/subpage\"},\"dsr\":[0,38,28,2]}'>/subpage</a></p>\n");
 add("html2html", "Subpage noslash link", "<p 
data-parsoid='{\"dsr\":[0,37,0,0]}'><a rel=\"mw:WikiLink\" 
href=\"./Wiki/Subpage_test/subpage\" title=\"Wiki/Subpage test/subpage\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Subpage_test/subpage\"},\"sa\":{\"href\":\"wiki/Subpage
 test/subpage\"},\"dsr\":[0,37,28,2]}'>subpage</a></p>\n");
@@ -561,7 +561,7 @@
 add("html2html", "Empty TR followed by a template-generated TR", "<table 
data-parsoid='{\"dsr\":[0,36,2,2]}'>\n<tbody about=\"#mwt1\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"dsr\":[3,34,0,0],\"pi\":[[{\"k\":\"1\"}]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;tr>&lt;td>foo&lt;/td>&lt;/tr>\"}},\"i\":0}},\"\\n\"]}'><tr><td>foo</td></tr>\n</tbody></table>\n");
 add("html2html", "Empty TR followed by mixed-ws-comment line should RT 
correctly", "<table data-parsoid='{\"dsr\":[0,36,2,2]}'>\n\n <!--c--><tbody 
data-parsoid='{\"dsr\":[13,34,0,0]}'><tr 
data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[13,25,2,0]}'>\n<!--c-->
 </tr><!--d-->\n</tbody></table>\n");
 add("html2html", "T73074: More fostering fun", "<link 
rel=\"mw:PageProp/Category\" href=\"./Category:Two\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Category:Two\"},\"sa\":{\"href\":\"Category:Two\"},\"dsr\":[0,16,null,null]}'/>\n<link
 rel=\"mw:PageProp/Category\" href=\"./Category:Two\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Category:Two\"},\"sa\":{\"href\":\"Category:Two\"},\"fostered\":true,\"dsr\":[17,17]}'/><table
 
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[17,70,7,0]}'><tbody
 data-parsoid='{\"dsr\":[24,70,0,0]}'><tr 
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[24,33,0,0]}'><td
 data-parsoid='{\"stx\":\"html\",\"dsr\":[24,33,4,5]}'></td></tr><tr 
about=\"#mwt1\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[33,70,null,0],\"pi\":[[{\"k\":\"1\"}]]}'
 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;tr>\"}},\"i\":0}},\"&lt;!--c-->[[Category:Two]]\"]}'><!--c--></tr></tbody></table>");
-add("html2html", "Image: upright option (parsoid)", "<figure 
class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" 
data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumb\"},{\"ck\":\"caption\",\"ak\":\"caption\"}],\"dsr\":[0,33,2,2]}'><a
 href=\"./File:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[2,null,null,null]}'><img
 resource=\"./File:Foobar.jpg\" 
src=\"//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg\" 
data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" 
height=\"25\" width=\"220\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"25\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a><figcaption
 
data-parsoid='{\"dsr\":[null,31,null,null]}'>caption</figcaption></figure>\n<figure
 class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" 
data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumb\"},{\"ck\":\"caption\",\"ak\":\"caption\"}],\"dsr\":[34,67,2,2]}'><a
 href=\"./File:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[36,null,null,null]}'><img
 resource=\"./File:Foobar.jpg\" 
src=\"//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg\" 
data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" 
height=\"25\" width=\"220\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"25\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a><figcaption
 
data-parsoid='{\"dsr\":[null,65,null,null]}'>caption</figcaption></figure>\n<figure
 typeof=\"mw:Image/Thumb\" 
data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumb\"},{\"ck\":\"width\",\"ak\":\"500x500px\"},{\"ck\":\"caption\",\"ak\":\"caption\"}],\"dsr\":[68,111,2,2]}'><a
 href=\"./File:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[70,null,null,null]}'><img
 resource=\"./File:Foobar.jpg\" 
src=\"//example.com/images/thumb/3/3a/Foobar.jpg/500px-Foobar.jpg\" 
data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" 
height=\"57\" width=\"500\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"57\",\"width\":\"500\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a><figcaption
 
data-parsoid='{\"dsr\":[null,109,null,null]}'>caption</figcaption></figure>\n");
+add("html2html", "Image: upright option (parsoid)", "<figure 
class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" 
data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumbnail\"},{\"ck\":\"caption\",\"ak\":\"caption\"}],\"dsr\":[0,37,2,2]}'><a
 href=\"./File:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[2,null,null,null]}'><img
 resource=\"./File:Foobar.jpg\" 
src=\"//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg\" 
data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" 
height=\"25\" width=\"220\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"25\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a><figcaption
 
data-parsoid='{\"dsr\":[null,35,null,null]}'>caption</figcaption></figure>\n<figure
 class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" 
data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumbnail\"},{\"ck\":\"caption\",\"ak\":\"caption\"}],\"dsr\":[38,75,2,2]}'><a
 href=\"./File:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[40,null,null,null]}'><img
 resource=\"./File:Foobar.jpg\" 
src=\"//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg\" 
data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" 
height=\"25\" width=\"220\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"25\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a><figcaption
 
data-parsoid='{\"dsr\":[null,73,null,null]}'>caption</figcaption></figure>\n<figure
 typeof=\"mw:Image/Thumb\" 
data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumbnail\"},{\"ck\":\"width\",\"ak\":\"500x500px\"},{\"ck\":\"caption\",\"ak\":\"caption\"}],\"dsr\":[76,123,2,2]}'><a
 href=\"./File:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[78,null,null,null]}'><img
 resource=\"./File:Foobar.jpg\" 
src=\"//example.com/images/thumb/3/3a/Foobar.jpg/500px-Foobar.jpg\" 
data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" 
height=\"57\" width=\"500\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"57\",\"width\":\"500\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a><figcaption
 
data-parsoid='{\"dsr\":[null,121,null,null]}'>caption</figcaption></figure>\n");
 add("html2html", "Consecutive <pre>s should not get merged", "<pre 
data-parsoid='{\"dsr\":[0,2,1,0]}'>a</pre>\n\n<pre 
data-parsoid='{\"dsr\":[4,6,1,0]}'>b</pre>\n\n<pre 
data-parsoid='{\"dsr\":[8,10,1,0]}'>c</pre>\n\n<pre 
data-parsoid='{\"dsr\":[12,14,1,0]}'>d</pre>\n\n<pre 
data-parsoid='{\"dsr\":[16,19,1,0]}'>e</pre>\n\n\n <p 
data-parsoid='{\"dsr\":[23,23,0,0]}'><br 
data-parsoid='{\"dsr\":[23,23,0,0]}'/></p>\n<pre 
data-parsoid='{\"dsr\":[24,26,1,0]}'>f</pre>\n");
 
 
@@ -957,10 +957,10 @@
 add("html2wt", "{{#speciale:}} page name, unknown", 
"Special:Foobar_nonexistent");
 add("html2wt", "Allow empty links in image captions (T62753)", 
"[[File:Foobar.jpg|thumb|Caption 
[[Link1]]\n<nowiki>[[]]</nowiki>\n[[Link2]]\n]]");
 add("html2wt", "Image with multiple attributes from the same template", 
"[[File:Foobar.jpg|right|Caption text]]\n");
-add("html2wt", "Image with link tails", 
"123[[File:Foobar.jpg]]456\n123\n[[File:Foobar.jpg|right]]\n456\n123\n[[File:Foobar.jpg|thumb]]\n456\n");
+add("html2wt", "Image with link tails", 
"123[[File:Foobar.jpg]]456\n123\n[[File:Foobar.jpg|right]]\n456\n123\n[[File:Foobar.jpg|thumbnail]]\n456\n");
 add("html2wt", "Image with multiple captions -- only last one is accepted", 
"[[File:Foobar.jpg|right|Caption3 - accepted]]\n");
 add("html2wt", "Image with multiple widths -- use last", 
"[[File:Foobar.jpg|300x300px|caption]]\n");
-add("html2wt", "Image with multiple alignments -- use first (T50664)", 
"[[File:Foobar.jpg|left|thumb|caption]]\n[[File:Foobar.jpg|middle|caption]]\n");
+add("html2wt", "Image with multiple alignments -- use first (T50664)", 
"[[File:Foobar.jpg|left|thumbnail|caption]]\n[[File:Foobar.jpg|middle|caption]]\n");
 add("html2wt", "Image with width attribute at different positions", 
"[[File:Foobar.jpg|right|200x200px|Caption]]\n[[File:Foobar.jpg|right|200x200px|Caption]]\n[[File:Foobar.jpg|right|200x200px|Caption]]\n");
 add("html2wt", "Image with link parameter, wiki target", 
"[[File:Foobar.jpg|link=Main_Page]]\n");
 add("html2wt", "Image with link parameter, wgNoFollowLinks set to false", 
"http://example.com/images/3/3a/Foobar.jpg\n";);
@@ -968,8 +968,8 @@
 add("html2wt", "Link to image page- image page normally doesn't exists, hence 
edit link\nAdd test with existing image page\n#<p><a href=\"/wiki/File:Test\" 
title=\"Image:Test\">Image:test</a>", 
"[/index.php?title=File:Test&action=edit&redlink=1 Image:test]\n");
 add("html2wt", "T20784  Link to non-existent image page with caption should 
use caption as link text", "[/index.php?title=File:Test&action=edit&redlink=1 
caption]\n");
 add("html2wt", "Parsoid-specific image handling - simple image with size and 
middle alignment", "[[File:Foobar.jpg|middle|50x50px]]\n");
-add("html2wt", "Parsoid-specific image handling - thumbnail with specific 
size, halign, valign, and caption", 
"[[File:Foobar.jpg|right|middle|thumb|50x50px|caption]]\n");
-add("html2wt", "Parsoid-specific image handling - caption with a template in 
it", "[[File:Foobar.jpg|thumb|200x200px|This caption has a 
{{echo|transclusion}} in it.]]\n");
+add("html2wt", "Parsoid-specific image handling - thumbnail with specific 
size, halign, valign, and caption", 
"[[File:Foobar.jpg|right|middle|thumbnail|50x50px|caption]]\n");
+add("html2wt", "Parsoid-specific image handling - caption with a template in 
it", "[[File:Foobar.jpg|thumbnail|200x200px|This caption has a 
{{echo|transclusion}} in it.]]\n");
 add("html2wt", "Subpage link", "[[wiki/Subpage test/subpage|/subpage]]\n");
 add("html2wt", "Subpage noslash link", "[[wiki/Subpage 
test/subpage|subpage]]\n");
 add("html2wt", "Render invalid page names as plain text (T53090)", 
"[[./../foo|bar]]\n[[foo�|bar]]\n[[foo/.|bar]]\n[[foo/..|bar]]\n<nowiki>[[foo~~~bar]]</nowiki>\n[[foo>bar]]\n[[foo[bar]]\n[[.]]\n[[..]]\n[[foo././bar]]\n\n[[{{echo|./../foo}}|bar]]\n[[{{echo|foo/.}}|bar]]\n[[{{echo|foo/..}}|bar]]\n[[{{echo|foo~~~~bar}}]]\n[[{{echo|foo>bar}}]]\n[[{{echo|foo././bar}}]]\n[[{{echo|foo{bar}}]]\n[[{{echo|foo}bar}}]]\n[[{{echo|foo[bar}}]]\n[[{{echo|foo]bar}}]]\n[[{{echo|foo<bar}}]]\n");
@@ -1206,7 +1206,7 @@
 add("html2wt", "Empty TR followed by mixed-ws-comment line should RT 
correctly", "{|\n\n <!--c-->|-\n<!--c--> <!--d-->\n|}\n");
 add("html2wt", "Improperly nested inline or quotes tags with whitespace in 
between", "<span> <s>x</s></span><s> </s>\n''' ''x'''''<nowiki/>'' ''\n");
 add("html2wt", "T73074: More fostering fun", 
"[[Category:Two]]\n<table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]");
-add("html2wt", "Image: upright option (parsoid)", 
"[[File:Foobar.jpg|thumb|caption]]\n[[File:Foobar.jpg|thumb|caption]]\n[[File:Foobar.jpg|thumb|500x500px|caption]]\n");
+add("html2wt", "Image: upright option (parsoid)", 
"[[File:Foobar.jpg|thumbnail|caption]]\n[[File:Foobar.jpg|thumbnail|caption]]\n[[File:Foobar.jpg|thumbnail|500x500px|caption]]\n");
 add("html2wt", "Image: upright option is ignored on inline and frame images 
(parsoid)", "[[File:Foobar.jpg|500x500px|caption]]\n");
 
 
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index be6e3a8..11a161c 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -14094,7 +14094,7 @@
 !! options
 thumbsize=220
 !! wikitext
-[[File:Foobar.jpg|thumb|http://example.com]]
+[[File:Foobar.jpg|thumbnail|http://example.com]]
 !! html/php
 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a 
href="/wiki/File:Foobar.jpg" class="image"><img alt="" 
src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg"; 
width="220" height="25" class="thumbimage" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a>  
<div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" 
class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external 
free" href="http://example.com";>http://example.com</a></div></div></div>
 
@@ -14120,7 +14120,7 @@
 SVG thumbnails with no language set
 !! options
 !! wikitext
-[[File:Foobar.svg|thumb|caption]]
+[[File:Foobar.svg|thumbnail|caption]]
 !! html/php
 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a 
href="/wiki/File:Foobar.svg" class="image"><img alt="" 
src="http://example.com/images/thumb/f/ff/Foobar.svg/180px-Foobar.svg.png"; 
width="180" height="135" class="thumbimage" 
srcset="http://example.com/images/thumb/f/ff/Foobar.svg/270px-Foobar.svg.png 
1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 2x" 
/></a>  <div class="thumbcaption"><div class="magnify"><a 
href="/wiki/File:Foobar.svg" class="internal" 
title="Enlarge"></a></div>caption</div></div></div>
 
@@ -14157,7 +14157,7 @@
 !! test
 T3887: A ISBN with a thumbnail
 !! wikitext
-[[File:Foobar.jpg|thumb|ISBN 1235467890]]
+[[File:Foobar.jpg|thumbnail|ISBN 1235467890]]
 !! html/php
 <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"></a></div><a 
href="/wiki/Special:BookSources/1235467890" class="internal 
mw-magiclink-isbn">ISBN 1235467890</a></div></div></div>
 
@@ -14168,7 +14168,7 @@
 !! test
 T3887: A RFC with a thumbnail
 !! wikitext
-[[File:Foobar.jpg|thumb|This is RFC 12354]]
+[[File:Foobar.jpg|thumbnail|This is RFC 12354]]
 !! html/php
 <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"></a></div>This is <a class="external 
mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc12354">RFC 
12354</a></div></div></div>
 
@@ -14179,7 +14179,7 @@
 !! test
 T3887: A mailto link with a thumbnail
 !! wikitext
-[[File:Foobar.jpg|thumb|Please mailto:nob...@example.com]]
+[[File:Foobar.jpg|thumbnail|Please mailto:nob...@example.com]]
 !! html/php
 <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"></a></div>Please <a rel="nofollow" 
class="external free" 
href="mailto:nob...@example.com";>mailto:nob...@example.com</a></div></div></div>
 
@@ -14302,7 +14302,7 @@
 !! test
 Image caption containing another image
 !! wikitext
-[[File:Foobar.jpg|thumb|This is a caption with another 
[[File:Thumb.png|image]] inside it!]]
+[[File:Foobar.jpg|thumbnail|This is a caption with another 
[[File:Thumb.png|image]] inside it!]]
 !! html/php
 <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"></a></div>This is a caption with another <a 
href="/wiki/File:Thumb.png" class="image" title="image"><img alt="image" 
src="http://example.com/images/e/ea/Thumb.png"; width="135" height="135" /></a> 
inside it!</div></div></div>
 
@@ -14322,17 +14322,17 @@
 <p><span class="mw-default-size" typeof="mw:Image" 
data-mw='{"caption":"This\n*is some text"}'><a href="./File:Foobar.jpg"><img 
resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" 
data-file-width="1941" data-file-height="220" data-file-type="bitmap" 
height="220" width="1941"/></a></span></p>
 !!end
 
-!!test
+## The leading space should not trigger nowiki escaping in wt2wt mode.
+!! test
 Image: caption containing leading space
-(The leading space should not trigger nowiki escaping in wt2wt mode)
 !! wikitext
-[[File:Foobar.jpg|thumb| bar]]
+[[File:Foobar.jpg|thumbnail| bar]]
 !! html/php
 <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"></a></div>bar</div></div></div>
 
 !! html/parsoid
 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a 
href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" 
src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" 
data-file-width="1941" data-file-height="220" data-file-type="bitmap" 
height="25" width="220"/></a><figcaption> bar</figcaption></figure>
-!!end
+!! end
 
 !! test
 Image: caption containing a table
@@ -14362,7 +14362,7 @@
 !! test
 T5090: External links other than http: in image captions
 !! wikitext
-[[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and 
[https://example.com Secure] ext links in it.]]
+[[File:Foobar.jpg|thumbnail|200x200px|This caption has [irc://example.net irc] 
and [https://example.com Secure] ext links in it.]]
 !! html/php
 <div class="thumb tright"><div class="thumbinner" style="width:202px;"><a 
href="/wiki/File:Foobar.jpg" class="image"><img alt="" 
src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg"; 
width="200" height="23" class="thumbimage" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a>  
<div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" 
class="internal" title="Enlarge"></a></div>This caption has <a rel="nofollow" 
class="external text" href="irc://example.net">irc</a> and <a rel="nofollow" 
class="external text" href="https://example.com";>Secure</a> ext links in 
it.</div></div></div>
 
@@ -14555,14 +14555,13 @@
 !! test
 Parsoid-specific image handling - thumbnail with halign, valign, and caption
 !! wikitext
-[[File:Foobar.jpg|left|baseline|thumb|caption content]]
+[[File:Foobar.jpg|left|baseline|thumbnail|caption content]]
 !! html/parsoid
 <figure class="mw-default-size mw-halign-left mw-valign-baseline" 
typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img 
resource="./File:Foobar.jpg" 
src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" 
data-file-width="1941" data-file-height="220" data-file-type="bitmap" 
height="25" width="220"/></a><figcaption>caption content</figcaption></figure>
 !! end
 
 !! test
-Parsoid-specific image handling - thumbnail with halign, valign, and caption
-(existing content)
+Parsoid-specific image handling - thumbnail with halign, valign, and caption 
(existing content)
 !! wikitext
 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
 !! html/parsoid
@@ -14578,8 +14577,7 @@
 !! end
 
 !! test
-Parsoid-specific image handling - thumbnail with specific size, halign,
-valign, and caption (existing content)
+Parsoid-specific image handling - thumbnail with specific size, halign, 
valign, and caption (existing content)
 !! wikitext
 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
 !! html/parsoid
@@ -14587,8 +14585,7 @@
 !! end
 
 !! test
-Parsoid-specific image handling - framed image with specific size and caption
-(size is ignored)
+Parsoid-specific image handling - framed image with specific size and caption 
(size is ignored)
 !! options
 parsoid=wt2html,wt2wt,html2html
 !! wikitext
@@ -14598,8 +14595,7 @@
 !! end
 
 !! test
-Parsoid-specific image handling - framed image with specific size, halign, 
valign, and caption
-(size is ignored)
+Parsoid-specific image handling - framed image with specific size, halign, 
valign, and caption (size is ignored)
 !! options
 parsoid=wt2html,wt2wt,html2html
 !! wikitext
@@ -14672,13 +14668,13 @@
   <figcaption></figcaption>
 </figure>
 !! wikitext
-[[File:Foobar.jpg|thumb]]
+[[File:Foobar.jpg|thumbnail]]
 !! end
 
 !! test
 Parsoid-specific image handling - whitespace caption
 !! wikitext
-[[File:Foobar.jpg|thumb| ]]
+[[File:Foobar.jpg|thumbnail| ]]
 !! html/parsoid
 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a 
href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" 
src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" 
data-file-width="1941" data-file-height="220" data-file-type="bitmap" 
height="25" width="220"/></a><figcaption> </figcaption></figure>
 !! end
@@ -19900,7 +19896,7 @@
 !! test
 Images with the "|" character in the comment
 !! wikitext
-[[File:Foobar.jpg|thumb|An [http://test/?param1=|left|&param2=|x external] 
URL]]
+[[File:Foobar.jpg|thumbnail|An [http://test/?param1=|left|&param2=|x external] 
URL]]
 !! html/php
 <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"></a></div>An <a rel="nofollow" class="external 
text" href="http://test/?param1=%7Cleft%7C&amp;param2=%7Cx";>external</a> 
URL</div></div></div>
 
@@ -24283,7 +24279,7 @@
 !! html/parsoid
  <figure class="mw-default-size" typeof="mw:Image/Thumb"><a 
href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" 
src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" 
data-file-width="1941" data-file-height="220" data-file-type="bitmap" 
height="25" width="220"/></a><figcaption>caption</figcaption></figure>
 !! wikitext
- [[File:Foobar.jpg|thumb|caption]]
+ [[File:Foobar.jpg|thumbnail|caption]]
 !! end
 
 !! test
@@ -24835,8 +24831,8 @@
 !!test
 Multi-line image caption generated by templates with/without trailing newlines
 !! wikitext
-[[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
-[[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
+[[File:Foobar.jpg|thumbnail|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
+[[File:Foobar.jpg|thumbnail|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
 !! html/parsoid
 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img 
resource="./File:Foobar.jpg" 
src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" 
data-file-width="1941" data-file-height="220" data-file-type="bitmap" 
height="34" width="300"/></a><figcaption>foo\n<span about="#mwt9" 
typeof="mw:Transclusion" 
data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"A"}},"i":0}}]}'>A</span>\n<span
 about="#mwt10" typeof="mw:Transclusion" 
data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"B"}},"i":0}}]}'>B</span>\n<span
 about="#mwt11" typeof="mw:Transclusion" 
data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"C"}},"i":0}}]}'>C</span></figcaption></figure>
 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img 
resource="./File:Foobar.jpg" 
src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" 
data-file-width="1941" data-file-height="220" data-file-type="bitmap" 
height="34" width="300"/></a><figcaption>foo\n<span about="#mwt12" 
typeof="mw:Transclusion" 
data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"A"}},"i":0}}]}'>A</span>\n<span
 about="#mwt13" typeof="mw:Transclusion" 
data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"B"}},"i":0}}]}'>B</span>\n<span
 about="#mwt14" typeof="mw:Transclusion" 
data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"C"}},"i":0}}]}'>C</span>\n\n</figcaption></figure>
@@ -25476,7 +25472,7 @@
 Image: Block level image should have \n before and after
 !! wikitext
 123
-[[File:Foobar.jpg|right|thumb|150x150px]]
+[[File:Foobar.jpg|right|thumbnail|150x150px]]
 456
 !! html/parsoid
 <p>123</p>
@@ -26282,11 +26278,11 @@
 !! test
 Magic links inside image captions (autolinked)
 !! wikitext
-[[File:Foobar.jpg|thumb|http://example.com]]
-[[File:Foobar.jpg|thumb|RFC 1234]]
-[[File:Foobar.jpg|thumb|PMID 1234]]
-[[File:Foobar.jpg|thumb|ISBN 123456789x]]
-!! html+tidy
+[[File:Foobar.jpg|thumbnail|http://example.com]]
+[[File:Foobar.jpg|thumbnail|RFC 1234]]
+[[File:Foobar.jpg|thumbnail|PMID 1234]]
+[[File:Foobar.jpg|thumbnail|ISBN 123456789x]]
+!! html/php+tidy
 <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">

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I885ab8ef245d7ec47c4607a16ed8e717f7ca99a7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra <abrea...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to