From: Subramanya Sastry Date: Tue, 27 Nov 2018 17:05:36 +0000 (-0500) Subject: Sync up with Parsoid parserTests.txt X-Git-Tag: 1.34.0-rc.0~3427 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=fbe6b633b72e24a292fed936556a146bd72d0be7;p=lhc%2Fweb%2Fwiklou.git Sync up with Parsoid parserTests.txt This now aligns with Parsoid commit 463678ed5c83764a3558fec13cea07825a4fddd4 Change-Id: I5bd67b9f20ee9cda2c1141670ab140d65f8a2cc0 --- diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index fdf1d5bbc9..b870efde56 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -28975,6 +28975,27 @@ Image: Invalid title as link

!! end +!! test +Various link types in alt and link options +!! wikitext +[[File:Foobar.jpg|link=[[Main Page]]|alt=[[Main Page]]|caption]] + +[[File:Foobar.jpg|link=[[Media:Thumb.png]]|alt=[[Media:Thumb.png]]|caption]] + +[[File:Foobar.jpg|link=[[wikipedia:Foo]]|alt=[[wikipedia:Foo]]|caption]] +!! html/php+tidy +

Main Page +

Media:Thumb.png +

wikipedia:Foo +

+!! html/parsoid +

Main Page

+ +

Media:Thumb.png

+ +

wikipedia:Foo

+!! end + !! test Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does) !! options @@ -30991,6 +31012,170 @@ parsoid={ foo !! end +!! test +Ignore empty

when scrubWikitext is false +!! options +parsoid={ + "modes": ["html2wt"], + "scrubWikitext": false +} +!! html/parsoid +
1
+

a

b

+
2
+

a

+

+

b

+
3
+

a

+

+

+

+

+

b

+!! wikitext +
1
+a + +b +
2
+a + +b +
3
+a + +b +!! html/php+tidy +
1
+

a +

b +

+
2
+

a +

b +

+
3
+

a +

b +

+!! end + +!! test +Normalize empty paragraphs to HTML form that html2wt expects +!! options +parsoid={ + "modes": ["html2wt"], + "scrubWikitext": true +} +!! html/parsoid +
1
+

a

b

+
2
+

a

+

+

b

+
3
+

a

+

+

+

+

+

b

+
4
+

a

+

+
foo
+!! wikitext +
1
+a + + +b +
2
+a + + +b +
3
+a + + + + + +b +
4
+a + +
+
foo
+!! html/php+tidy +
1
+

a +


+b +

+
2
+

a +


+b +

+
3
+

a +


+


+

b +

+
4
+

a +


+

+
foo
+!! end + +!! test +Empty paragraphs (marked with mw-empty-elt) found in source should not be normalized away +!! options +parsoid={ + "modes": ["html2wt"], + "scrubWikitext": true +} +!! html/parsoid + + + + + + + +
foo +
+

+
+!! wikitext +{| +|
foo +
+|+ +|} +!! end + +!! test +Templated content should be skipped over by normalization +!! options +parsoid={ + "modes": ["html2wt"], + "scrubWikitext": true +} +!! html/parsoid +

foobar

foobar

+

+ +!! wikitext +{{SomeTemplate1|boo}}{{SomeTemplate2|booboo}} +!! end + !! test Escape nowiki DOM elements !! options