[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Added

2018-01-11 Thread Sbailey (Code Review)
Sbailey has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403763 )

Change subject: Added https://gerrit.wikimedia.org/r/403763
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f381a1e76f7592f61a5a5999a8d00c784ad2abc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Sbailey 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T45094 span to sup change

2017-12-15 Thread Sbailey (Code Review)
Sbailey has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398616 )

Change subject: T45094 span to sup change
..

T45094 span to sup change

Change-Id: I7c83d12dd900682799c124ddae1a8689969d5e8c
---
M lib/ext/Cite/index.js
M tests/citeParserTests.txt
2 files changed, 66 insertions(+), 66 deletions(-)


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

diff --git a/lib/ext/Cite/index.js b/lib/ext/Cite/index.js
index ced0b51..77982d6 100644
--- a/lib/ext/Cite/index.js
+++ b/lib/ext/Cite/index.js
@@ -424,7 +424,7 @@
 
// Add ref-index linkback
var doc = node.ownerDocument;
-   var span = doc.createElement('span');
+   var span = doc.createElement('sup');
var content = dp.content;
var dataMw = Util.clone(DU.getDataMw(node));
var body;
diff --git a/tests/citeParserTests.txt b/tests/citeParserTests.txt
index 5e29443..38f98d3 100644
--- a/tests/citeParserTests.txt
+++ b/tests/citeParserTests.txt
@@ -631,7 +631,7 @@
 
 
 !! html/parsoid
-[1]
+[1]
 ↑  ">[bar]
 !! end
 
@@ -651,7 +651,7 @@
 
 
 !! html/parsoid
-[1]
+[1]
 ↑  [bar]
 !! end
 
@@ -670,9 +670,9 @@
 C 
 
 !! html/parsoid
-A [1]
-B [2]
-C [3]
+A [1]
+B [2]
+C [3]
 
 ↑  foo
 ↑  foo
@@ -687,8 +687,8 @@
 B 
 
 !! html/parsoid
-A [1]
-B [1]
+A [1]
+B [1]
 
 1 
2  foo
 
@@ -702,9 +702,9 @@
 C 
 
 !! html/parsoid
-A [1]
-B [1]
-C [1]
+A [1]
+B [1]
+C [1]
 
 1 
2 3 
 foo
 
@@ -717,7 +717,7 @@
 A foo
 
 !! html/parsoid
-A [1]
+A [1]
 
 ↑  foo
 
@@ -732,7 +732,7 @@
 
 
 !! html/parsoid
-A [1]
+A [1]
 
 
 ↑  This is a bolded link 
and this is a transclusion
@@ -751,7 +751,7 @@
 
 
 !! html/parsoid
-A [1]
+A [1]
 
 
 ↑  foo
@@ -779,7 +779,7 @@
 
 
 !! html/parsoid
-A [1]
+A [1]
 
 
 ↑  foo
@@ -803,7 +803,7 @@
 
 
 !! html/parsoid
-A [1] B C}}
+A [1] B C}}
 
 ↑  foo 
{{echo|
 
@@ -815,7 +815,7 @@
 A  foo 
 
@@ -828,7 +828,7 @@
 
 
 !! html/parsoid
-A [1] B C
+A [1] B C
 
 
 
@@ -843,8 +843,8 @@
 C bar D
 
 !! html/parsoid
-A [1] B
-C [2] D
+A [1] B
+C [2] D
 
 ↑  foo
 ↑  bar
@@ -865,8 +865,8 @@
 a
 
 
-b [1]
-[2]
+b [1]
+[2]
 
 c
 
@@ -882,8 +882,8 @@
  B
 
 !! html/parsoid
-[1] A
-[2] B
+[1] A
+[2] B
 
 ↑  foo
 ↑  bar
@@ -901,7 +901,7 @@
 
 
 !! html/parsoid
-[1] baz/ref>
+[1] baz/ref>
 
 ↑  foo ref>bar
 !! end
@@ -914,8 +914,8 @@
 
 
 !! html/parsoid
-A1 [1] A2 [1]
-B1 [2] B2 [2]
+A1 [1] A2 [1]
+B1 [2] B2 [2]
 
 1 
2  foo1 
2  bar
 
@@ -931,7 +931,7 @@
 
 
 !! html/parsoid
-A [1]
+A [1]
 
 ↑  foo
 !! end
@@ -944,8 +944,8 @@
 
 
 !! html/parsoid
-[1]
-[2]
+[1]
+[2]
 
 ↑  foo↑  ve-created 
name
 
@@ -968,7 +968,7 @@
 
 
 !! html/parsoid
-[1]
+[1]
 
 
 
@@ -997,7 +997,7 @@
 
 
 !! html/parsoid
-1 [1] 2 [1]
+1 [1] 2 [1]
 
 
 1 2 
 foo
@@ -1013,9 +1013,9 @@
 
 
 !! html/parsoid
-A [1]
-B [1]
-C [1]
+A [1]
+B [1]
+C [1]
 
 1 
2 3 
 Foo one
 
@@ -1040,9 +1040,9 @@
 
 
 !! html/parsoid
-A [a 1]
-B [b 1]
-C [1]
+A [a 1]
+B [b 1]
+C [1]
 
 
 ↑ 
 foo
@@ -1066,12 +1066,12 @@
 
 
 !! html/parsoid
-A [1]
+A [1]
 
 ↑  foo
 
 
-B [1]
+B [1]
 
 
 ↑  bar
@@ -1090,13 +1090,13 @@
 
 
 !! html/parsoid
-A [a 1]
-B [1]
+A [a 1]
+B [1]
 
 ↑  afoo
 
 
-C [2]
+C [2]
 
 ↑  bfoo↑  cfoo
 
@@ -1116,11 +1116,11 @@
 This should just get lost.
 
 !! html/parsoid
-A [1]
-B [2]
+A [1]
+B [2]
 
 
-↑  foo↑  bar
+↑  foo↑  bar
 
 !! end
 
@@ -1129,7 +1129,7 @@
 !! wikitext
 Foo {{echo|}}
 !! html/parsoid
-[1] ↑  Foo
+[1] ↑  Foo
 
 !! end
 
@@ -1145,15 +1145,15 @@
 foo
 
 !! html/parsoid
-A [1]
-B [X 1]
+A [1]
+B [X 1]
 
 
 
 ↑  foo bar for 
a
 
 
-
+
 ↑  foo
 
 !! end
@@ -1164,7 +1164,7 @@
 X{{echo|foo {{echo|bar}} and {{echo|baz}} boo}}
 
 !! html/parsoid
-X[1]
+X[1]
 ↑  foo bar and baz boo
 
 !! end
@@ -1179,7 +1179,7 @@
 A foo
 B bar
 !! html/parsoid
-A [1] B [inexistent 1]
+A [1] B [inexistent 1]
 
 ↑  foo
 
@@ -1223,7 +1223,7 @@
 
 
 !! html/parsoid
-[1]
+[1]
 
 ↑  hi
 
@@ -1243,7 +1243,7 @@
 
 
 !! html/parsoid
-a[1]
+a[1]
 
 references>
 ↑  foo
@@ -1266,8 +1266,8 @@
 test hi {{refinref}}
 
 !! html/parsoid
-test [1]
-↑  hi [2]↑  ho
+test [1]
+↑  hi [2]↑  ho
 !! end
 
 ## Parsoid responsive references tests
@@ -1282,7 +1282,7 @@
 !! wikitext
 Test 12
 !! html/parsoid
-Test [1][2]
+Test [1][2]
 ↑  1↑  2
 !! end
 
@@ -1296,7 +1296,7 @@
 !! wikitext
 Test 12
 !! html/parsoid
-Test [1][2]
+Test [1][2]
 ↑  1↑  2
 !! end
 
@@ -1310,7 +1310,7 @@
 !! wikitext
 Test 12
 !! html/parsoid
-Test [1][2]
+Test [1][2]
 ↑  1↑  2
 !! end
 
@@ -1324,7 +1324,7 @@
 Test 12
 
 !! html/parsoid
-Test [1][2]
+Test [1][2]
 ↑  1↑  2
 !! end
 
@@ -1338,7 +1338,7 @@
 Test 12
 
 !! html/parsoid
-Test [1][2]
+Test [1][2]
 ↑  1↑  2
 !! end
 
@@ -1352,7 +1352,7 @@
 Test 12
 
 !! html/parsoid
-Test [1][2]
+Test [1][2]
 ↑  1↑  2
 !! end
 
@@ -1366,7 +1366,7 @@
 Test 12
 
 !! html/parsoid
-Test [1][2]
+Test [1][2]
 ↑  1↑  2
 !! end
 
@@ -1380,7 +1380,7 @@
 Test 12
 
 !! html/parsoid
-Test [1][2]
+Test [1][2]
 ↑  1↑  2
 !! end
 
@@ -1394,7 +1394,7 @@
 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: WIP T97093 Interlink/WikiLink change

2017-11-28 Thread Sbailey (Code Review)
Sbailey has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/393832 )

Change subject: WIP T97093 Interlink/WikiLink change
..

WIP T97093 Interlink/WikiLink change

Change-Id: If0595ee63ee1be29ada5d6ce12e05f7bd1bb3e8c
---
M lib/wt2html/tt/LinkHandler.js
M tests/parserTests.txt
2 files changed, 28 insertions(+), 27 deletions(-)


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

diff --git a/lib/wt2html/tt/LinkHandler.js b/lib/wt2html/tt/LinkHandler.js
index 77c4858..a1a1b5f 100644
--- a/lib/wt2html/tt/LinkHandler.js
+++ b/lib/wt2html/tt/LinkHandler.js
@@ -631,7 +631,8 @@
newTk.addNormalizedAttribute('href', Util.sanitizeURI(absHref), 
target.hrefSrc);
 
// Change the rel to be mw:ExtLink
-   Util.lookupKV(newTk.attribs, 'rel').v = 'mw:ExtLink';
+   // Util.lookupKV(newTk.attribs, 'rel').v = 'mw:ExtLink';
+   Util.lookupKV(newTk.attribs, 'rel').v = 'mw:WikiLink/InterWiki';
// Remember that this was using wikitext syntax though
newTk.dataAttribs.isIW = true;
// Add title unless it's just a fragment (and trim off fragment)
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 7cb9950..03fa227 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -4851,8 +4851,8 @@
 
 !! html/parsoid
 http://en.wikipedia.org/wiki/Foo;>
-http://en.wikipedia.org/wiki/Foo; 
title="wikipedia:Foo">Bar
-http://en.wikipedia.org/wiki/Foo; 
title="wikipedia:Foo">Bar
+http://en.wikipedia.org/wiki/Foo; 
title="wikipedia:Foo">Bar
+http://en.wikipedia.org/wiki/Foo; 
title="wikipedia:Foo">Bar
 !! end
 
 !! test
@@ -8623,7 +8623,7 @@
 http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity; class="extiw" 
title="meatball:SoftSecurity">MeatBall:SoftSecurity
 
 !! html/parsoid
-http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity; 
title="meatball:SoftSecurity">MeatBall:SoftSecurity
+http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity; 
title="meatball:SoftSecurity">MeatBall:SoftSecurity
 !! end
 
 !! test
@@ -8636,7 +8636,7 @@
 http://www.usemod.com/cgi-bin/mb.pl; class="extiw" 
title="meatball:">MeatBall:
 
 !! html/parsoid
-http://www.usemod.com/cgi-bin/mb.pl?; 
title="meatball:">MeatBall:
+http://www.usemod.com/cgi-bin/mb.pl?; 
title="meatball:">MeatBall:
 !! end
 
 ## html2wt and html2html will fail because we will prefer the :en: interwiki 
prefix over wikipedia:
@@ -8658,8 +8658,8 @@
 
 !! html/parsoid
 
-http://en.wikipedia.org/wiki/ro:Olteniţa; 
title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa
-http://en.wikipedia.org/wiki/ro:Olteniţa; 
title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa
+http://en.wikipedia.org/wiki/ro:Olteniţa; 
title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa
+http://en.wikipedia.org/wiki/ro:Olteniţa; 
title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa
 
 !! end
 
@@ -8686,7 +8686,7 @@
 !! html/parsoid
 #Is this great?
 Foo#Is this great?
-http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F; 
title="meatball:Foo" 
data-parsoid='{"stx":"simple","a":{"href":"http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F"},"sa":{"href":"meatball:Foo#Is
 this great?"},"isIW":true}'>meatball:Foo#Is this great?
+http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F; 
title="meatball:Foo" 
data-parsoid='{"stx":"simple","a":{"href":"http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F"},"sa":{"href":"meatball:Foo#Is
 this great?"},"isIW":true}'>meatball:Foo#Is this great?
 !! end
 
 # Ideally the wikipedia: prefix here should be proto-relative too
@@ -8711,19 +8711,19 @@
 
 [[  wikiPEdia :Foo]]
 !! html/parsoid
-en:Foo
+en:Foo
 
-Foo
+Foo
 
-http://en.wikipedia.org/wiki/Foo; 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true}'
 title="wikipedia:Foo">wikipedia:Foo
+http://en.wikipedia.org/wiki/Foo; 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true}'
 title="wikipedia:Foo">wikipedia:Foo
 
-http://en.wikipedia.org/wiki/Foo; 
data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":":wikipedia:Foo"},"isIW":true}'
 title="wikipedia:Foo">Foo
+http://en.wikipedia.org/wiki/Foo; 
data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":":wikipedia:Foo"},"isIW":true}'
 title="wikipedia:Foo">Foo
 
-http://en.wikipedia.org/wiki/en:Foo; 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":"wikipedia:en:Foo"},"isIW":true}'
 title="wikipedia:en:Foo">wikipedia:en:Foo
+http://en.wikipedia.org/wiki/en:Foo; 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":"wikipedia:en:Foo"},"isIW":true}'
 title="wikipedia:en:Foo">wikipedia:en:Foo
 
-http://en.wikipedia.org/wiki/en:Foo;