jenkins-bot has submitted this change and it was merged.

Change subject: Use rel="mw:WikiLink" for ISBN magic links
......................................................................


Use rel="mw:WikiLink" for ISBN magic links

As per our policy, treat mw:WikiLink and mw:ExtLink interchangably when
serializing.

Change-Id: Ibdad2fa98fca08eeaa96bf33a08dd7723c1edb8c
---
M lib/ext.core.LinkHandler.js
M lib/pegTokenizer.pegjs.txt
M lib/wts.LinkHandler.js
M lib/wts.escapeWikitext.js
M tests/parserTests-blacklist.js
M tests/parserTests.txt
6 files changed, 29 insertions(+), 22 deletions(-)

Approvals:
  Subramanya Sastry: Looks good to me, approved
  Jforrester: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/lib/ext.core.LinkHandler.js b/lib/ext.core.LinkHandler.js
index 5ddfb33..deadadd 100644
--- a/lib/ext.core.LinkHandler.js
+++ b/lib/ext.core.LinkHandler.js
@@ -1562,12 +1562,15 @@
 
        if (rdfaType && magLinkRe.test(rdfaType)) {
                var newHref = href;
+               var newRel = 'mw:ExtLink';
                if (/(?:^|\s)mw:(Ext|Wiki)Link\/ISBN/.test(rdfaType)) {
                        newHref = env.page.relativeLinkPrefix + href;
+                       // ISBNs use mw:WikiLink instead of mw:ExtLink
+                       newRel = 'mw:WikiLink';
                }
                newAttrs = [
                        new KV('href', newHref),
-                       new KV('rel', 'mw:ExtLink'),
+                       new KV('rel', newRel),
                ];
                token.removeAttribute('typeof');
 
diff --git a/lib/pegTokenizer.pegjs.txt b/lib/pegTokenizer.pegjs.txt
index 191a243..ffd4876 100644
--- a/lib/pegTokenizer.pegjs.txt
+++ b/lib/pegTokenizer.pegjs.txt
@@ -476,7 +476,7 @@
         new SelfclosingTagTk('extlink', [
            new KV('href', 'Special:BookSources/' + isbncode.toUpperCase()),
            new KV('mw:content', 'ISBN ' + isbn),
-           new KV('typeof', 'mw:ExtLink/ISBN'),
+           new KV('typeof', 'mw:WikiLink/ISBN'),
         ],
         { stx: "magiclink", tsr: tsrOffsets() }),
     ];
diff --git a/lib/wts.LinkHandler.js b/lib/wts.LinkHandler.js
index 99d8ed1..ca5f361 100644
--- a/lib/wts.LinkHandler.js
+++ b/lib/wts.LinkHandler.js
@@ -630,6 +630,10 @@
        // Get the rt data from the token and tplAttrs
        var linkData = getLinkRoundTripData(env, node, state);
        var linkType = linkData.type;
+       if (wiki.ExtResourceURLPatternMatcher.match(linkData.origHref)) {
+               // Override the 'rel' type if this is a magic link
+               linkType = 'mw:ExtLink';
+       }
        if (linkType !== null && linkData.target.value !== null) {
                // We have a type and target info
                if (/^mw:WikiLink$/.test(linkType) || 
Util.solTransparentLinkRegexp.test(linkType)) {
diff --git a/lib/wts.escapeWikitext.js b/lib/wts.escapeWikitext.js
index 0757f00..849f9bc 100644
--- a/lib/wts.escapeWikitext.js
+++ b/lib/wts.escapeWikitext.js
@@ -279,7 +279,7 @@
                        // * Ignore RFC/ISBN/PMID tokens when those are 
encountered in the
                        //   context of another link's content -- those are not 
parsed to
                        //   ext-links in that context. (T109371)
-                       if (t.name === 'extlink' && t.dataAttribs && 
t.dataAttribs.stx === 'magiclink' && (state.inAttribute || state.inLink)) {
+                       if ((t.name === 'extlink' || t.name === 'wikilink') && 
t.dataAttribs && t.dataAttribs.stx === 'magiclink' && (state.inAttribute || 
state.inLink)) {
                                continue;
                        }
 
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index d1c8ca0..95c2269 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -102,7 +102,7 @@
 add("wt2html", "Namespace (lang=de) Benutzer Diskussion {{ns:3}}", "<p 
about=\"#mwt1\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"dsr\":[0,8,0,0],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"ns:3\",\"function\":\"ns\"},\"params\":{},\"i\":0}}]}'>3</p>");
 add("wt2html", "Urlencode", "<p data-parsoid='{\"dsr\":[0,115,0,0]}'><span 
about=\"#mwt1\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[0,24,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"urlencode:hi 
world?!\",\"function\":\"urlencode\"},\"params\":{},\"i\":0}}]}'>hi%20world%3F!</span>\n<span
 about=\"#mwt2\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[25,54,null,null]}'
 data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"urlencode:hi 
world?!\",\"function\":\"urlencode\"},\"params\":{\"1\":{\"wt\":\"WIKI\"}},\"i\":0}}]}'>hi%20world%3F!</span>\n<span
 about=\"#mwt3\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[55,84,null,null]}'
 data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"urlencode:hi 
world?!\",\"function\":\"urlencode\"},\"params\":{\"1\":{\"wt\":\"PATH\"}},\"i\":0}}]}'>hi%20world%3F!</span>\n<span
 about=\"#mwt4\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[85,115,null,null]}'
 data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"urlencode:hi 
world?!\",\"function\":\"urlencode\"},\"params\":{\"1\":{\"wt\":\"QUERY\"}},\"i\":0}}]}'>hi%20world%3F!</span></p>");
 add("wt2html", "Magic links: RFC (w/ non-newline whitespace, bug 
28950/29025)", "<p data-parsoid='{\"dsr\":[0,47,0,0]}'>RFC <span 
typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;nbsp;\",\"srcContent\":\" 
\",\"dsr\":[4,10,null,null]}'> </span><span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#160;\",\"srcContent\":\" 
\",\"dsr\":[10,16,null,null]}'> </span><span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#0160;\",\"srcContent\":\" 
\",\"dsr\":[16,23,null,null]}'> </span><span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#xA0;\",\"srcContent\":\" 
\",\"dsr\":[23,29,null,null]}'> </span><span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#Xa0;\",\"srcContent\":\" 
\",\"dsr\":[29,35,null,null]}'> </span> 822\n<a 
href=\"//tools.ietf.org/html/rfc822\" rel=\"mw:ExtLink\" 
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[40,47,0,0]}'>RFC 822</a></p>");
-add("wt2html", "Magic links: ISBN (w/ non-newline whitespace, bug 
28950/29025)", "<p data-parsoid='{\"dsr\":[0,114,0,0]}'>ISBN <span 
typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;nbsp;\",\"srcContent\":\" 
\",\"dsr\":[5,11,null,null]}'> </span><span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#160;\",\"srcContent\":\" 
\",\"dsr\":[11,17,null,null]}'> </span><span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#0160;\",\"srcContent\":\" 
\",\"dsr\":[17,24,null,null]}'> </span><span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#xA0;\",\"srcContent\":\" 
\",\"dsr\":[24,30,null,null]}'> </span><span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#Xa0;\",\"srcContent\":\" 
\",\"dsr\":[30,36,null,null]}'> </span> 978<span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;nbsp;\",\"srcContent\":\" 
\",\"dsr\":[40,46,null,null]}'> </span>0<span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#160;\",\"srcContent\":\" 
\",\"dsr\":[47,53,null,null]}'> </span>316<span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#0160;\",\"srcContent\":\" 
\",\"dsr\":[56,63,null,null]}'> </span>09811<span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#xA0;\",\"srcContent\":\" 
\",\"dsr\":[68,74,null,null]}'> </span>3\n<a 
href=\"./Special:BookSources/9780316098113\" rel=\"mw:ExtLink\" 
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[76,94,0,0]}'>ISBN 
9780316098113</a>\nISBN 978\n0316098113</p>");
+add("wt2html", "Magic links: ISBN (w/ non-newline whitespace, bug 
28950/29025)", "<p data-parsoid='{\"dsr\":[0,114,0,0]}'>ISBN <span 
typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;nbsp;\",\"srcContent\":\" 
\",\"dsr\":[5,11,null,null]}'> </span><span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#160;\",\"srcContent\":\" 
\",\"dsr\":[11,17,null,null]}'> </span><span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#0160;\",\"srcContent\":\" 
\",\"dsr\":[17,24,null,null]}'> </span><span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#xA0;\",\"srcContent\":\" 
\",\"dsr\":[24,30,null,null]}'> </span><span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#Xa0;\",\"srcContent\":\" 
\",\"dsr\":[30,36,null,null]}'> </span> 978<span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;nbsp;\",\"srcContent\":\" 
\",\"dsr\":[40,46,null,null]}'> </span>0<span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#160;\",\"srcContent\":\" 
\",\"dsr\":[47,53,null,null]}'> </span>316<span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#0160;\",\"srcContent\":\" 
\",\"dsr\":[56,63,null,null]}'> </span>09811<span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#xA0;\",\"srcContent\":\" 
\",\"dsr\":[68,74,null,null]}'> </span>3\n<a 
href=\"./Special:BookSources/9780316098113\" rel=\"mw:WikiLink\" 
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[76,94,2,2]}'>ISBN 
9780316098113</a>\nISBN 978\n0316098113</p>");
 add("wt2html", "Magic links: PMID (w/ non-newline whitespace, bug 
28950/29025)", "<p data-parsoid='{\"dsr\":[0,51,0,0]}'>PMID <span 
typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;nbsp;\",\"srcContent\":\" 
\",\"dsr\":[5,11,null,null]}'> </span><span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#160;\",\"srcContent\":\" 
\",\"dsr\":[11,17,null,null]}'> </span><span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#0160;\",\"srcContent\":\" 
\",\"dsr\":[17,24,null,null]}'> </span><span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#xA0;\",\"srcContent\":\" 
\",\"dsr\":[24,30,null,null]}'> </span><span typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;#Xa0;\",\"srcContent\":\" 
\",\"dsr\":[30,36,null,null]}'> </span> 1234\n<a 
href=\"//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract\" rel=\"mw:ExtLink\" 
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[42,51,0,0]}'>PMID 1234</a></p>");
 add("wt2html", "Nonexistent template", "<p 
data-parsoid='{\"dsr\":[0,28,0,0]}'><span typeof=\"mw:Transclusion 
mw:Placeholder\" about=\"#mwt1\" id=\"mwt1\" 
data-parsoid='{\"dsr\":[0,28,null,null],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"thistemplatedoesnotexist\",\"href\":\"./Template:Thistemplatedoesnotexist\"},\"params\":{},\"i\":0}}]}'>Warning:
 Page/template fetching disabled, and no cache for 
Template:Thistemplatedoesnotexist</span></p>");
 add("wt2html", "Template with invalid target containing tags", "<p 
data-parsoid='{\"dsr\":[0,54,0,0]}'>{{a<b 
data-parsoid='{\"stx\":\"html\",\"dsr\":[3,11,3,4]}'>b</b>|<span 
about=\"#mwt2\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[12,24,null,null]}'
 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>|<span
 about=\"#mwt3\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[25,35,null,null]}'
 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"a\"}},\"i\":0}}]}'>a</span>=<span
 about=\"#mwt4\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[36,46,null,null]}'
 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"b\"}},\"i\":0}}]}'>b</span>|a
 =b}}</p>");
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 43c1ada..0b9ec44 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -9945,7 +9945,7 @@
 <p>This is <a href="/wiki/Special:BookSources/9780316098113" class="internal 
mw-magiclink-isbn">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is 
not ISBN 978-0-316-09811-3linked.
 </p>
 !! html/parsoid
-<p>This is <a href="./Special:BookSources/9780316098113" rel="mw:ExtLink">ISBN 
978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 
978-0-316-09811-3linked.</p>
+<p>This is <a href="./Special:BookSources/9780316098113" 
rel="mw:WikiLink">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is 
not ISBN 978-0-316-09811-3linked.</p>
 !! end
 
 !! test
@@ -13273,7 +13273,7 @@
 <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>
 
 !! 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><a 
href="./Special:BookSources/1235467890" rel="mw:ExtLink">ISBN 
1235467890</a></figcaption></figure>
+<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><a 
href="./Special:BookSources/1235467890" rel="mw:WikiLink">ISBN 
1235467890</a></figcaption></figure>
 !! end
 
 !! test
@@ -18243,7 +18243,7 @@
 !! html+tidy
 <p><a href="/wiki/Special:BookSources/9780123456" class="internal 
mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
 !! html/parsoid
-<p><a href="./Special:BookSources/9780123456" rel="mw:ExtLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 978-0-1234-56</a><span 
typeof="mw:Entity" data-parsoid='{"src":"&amp;#x20;","srcContent":" "}'> 
</span>789</p>
+<p><a href="./Special:BookSources/9780123456" rel="mw:WikiLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 978-0-1234-56</a><span 
typeof="mw:Entity" data-parsoid='{"src":"&amp;#x20;","srcContent":" "}'> 
</span>789</p>
 !! end
 
 !! test
@@ -18263,7 +18263,7 @@
 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal 
mw-magiclink-isbn">ISBN 1234567890</a>
 </p>
 !! html/parsoid
-<p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
+<p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
 !! end
 
 # Uppercase X and lowercase x as well
@@ -18285,12 +18285,12 @@
 <a href="/wiki/Special:BookSources/978080442957X" class="internal 
mw-magiclink-isbn">ISBN 978080442957x</a>
 </p>
 !! html/parsoid
-<p><a href="./Special:BookSources/346204561X" rel="mw:ExtLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
-<a href="./Special:BookSources/346204561X" rel="mw:ExtLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
-<a href="./Special:BookSources/080442957X" rel="mw:ExtLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
-<a href="./Special:BookSources/080442957X" rel="mw:ExtLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
-<a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
-<a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
+<p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
+<a href="./Special:BookSources/346204561X" rel="mw:WikiLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
+<a href="./Special:BookSources/080442957X" rel="mw:WikiLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
+<a href="./Special:BookSources/080442957X" rel="mw:WikiLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
+<a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
+<a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
 !! end
 
 !! test
@@ -18301,7 +18301,7 @@
 <p><a href="/wiki/Special:BookSources/1234567890" class="internal 
mw-magiclink-isbn">ISBN 1234567890</a>
 </p>
 !! html/parsoid
-<p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 
1234567890</a></p>
+<p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 
1234567890</a></p>
 !! end
 
 !! test
@@ -18312,7 +18312,7 @@
 <p><abbr>(fr)</abbr> <a href="/wiki/Special:BookSources/2753300917" 
class="internal mw-magiclink-isbn">ISBN 2753300917</a> <a rel="nofollow" 
class="external text" href="http://www.example.com";>example.com</a>
 </p>
 !! html/parsoid
-<p><abbr data-parsoid='{"stx":"html"}'>(fr)</abbr> <a 
href="./Special:BookSources/2753300917" rel="mw:ExtLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 2753300917</a> <a rel="mw:ExtLink" 
href="http://www.example.com";>example.com</a></p>
+<p><abbr data-parsoid='{"stx":"html"}'>(fr)</abbr> <a 
href="./Special:BookSources/2753300917" rel="mw:WikiLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 2753300917</a> <a rel="mw:ExtLink" 
href="http://www.example.com";>example.com</a></p>
 !! end
 
 !! test
@@ -22936,9 +22936,9 @@
 !! test
 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 
64300)
 !! html/parsoid
-<p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
-<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
-a<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
+<p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
+<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
+a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
 </p>
 !! wikitext
 ISBN 1234567890<nowiki/>1
@@ -22949,7 +22949,7 @@
 !! test
 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 
64300)
 !! html/parsoid
-<p>-<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
+<p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" 
data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
 !! wikitext
 -ISBN 1234567890's
 !! html/php
@@ -24987,7 +24987,7 @@
 !! options
 parsoid=html2wt
 !! html/parsoid
-<a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
+<a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
 !! wikitext
 [[Special:BookSources/1234567890|ISBN 1234567895]]
 !! end
@@ -25164,7 +25164,7 @@
 <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><a rel="mw:ExtLink" 
href="http://example.com";>http://example.com</a></figcaption></figure>
 <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><a 
href="//tools.ietf.org/html/rfc1234" rel="mw:ExtLink">RFC 
1234</a></figcaption></figure>
 <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><a 
href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 
1234</a></figcaption></figure>
-<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><a 
href="./Special:BookSources/123456789X" rel="mw:ExtLink">ISBN 
123456789x</a></figcaption></figure>
+<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><a 
href="./Special:BookSources/123456789X" rel="mw:WikiLink">ISBN 
123456789x</a></figcaption></figure>
 !! end
 
 !! test

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibdad2fa98fca08eeaa96bf33a08dd7723c1edb8c
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>
Gerrit-Reviewer: Arlolra <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to