Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/79427
Change subject: WIP: Sync parserTests with core. ...................................................................... WIP: Sync parserTests with core. This matches upstream commit xxxxx. The following bugs are related to the blacklist changes: * Bug 6200, bug 52761: newlines and preformatted in blockquote * Bug 52938: Tabs do not cause indent-pres, only spaces do * Bug 49926: posessives and italics * Bug 52762: lines with WS and comments only should be transparent to all Change-Id: I5a8281a67e1978459a1f14dd4503ea1e497a8fe8 --- M js/tests/fetch-parserTests.txt.js M js/tests/parserTests-blacklist.js M js/tests/parserTests.txt 3 files changed, 177 insertions(+), 102 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/27/79427/1 diff --git a/js/tests/fetch-parserTests.txt.js b/js/tests/fetch-parserTests.txt.js index a3426bc..f9c5684 100755 --- a/js/tests/fetch-parserTests.txt.js +++ b/js/tests/fetch-parserTests.txt.js @@ -10,9 +10,9 @@ // and update these hashes automatically. // // You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value: -var expectedSHA1 = "3aa4ff16bbbb8f50d5a9981372ffcbb5b501c13e"; +var expectedSHA1 = "2900c9165e78a62167667f740fac1385fa450cfe"; // git log --pretty=oneline -1 tests/parser/parserTests.txt -var latestCommit = "9b22f7bc26f770e339bd9fa6b3542c84bb7723eb"; +var latestCommit = "xx"; var fs = require('fs'), path = require('path'), diff --git a/js/tests/parserTests-blacklist.js b/js/tests/parserTests-blacklist.js index c7ce45a..ce2fa66 100644 --- a/js/tests/parserTests-blacklist.js +++ b/js/tests/parserTests-blacklist.js @@ -38,7 +38,8 @@ add("wt2html", "Extra newlines: More paragraphs with indented comment"); add("wt2html", "Extra newlines between heading and content are swallowed"); add("wt2html", "Italics and bold"); -add("wt2html", "Italics and possessives"); +add("wt2html", "Italics and possessives (1)"); +add("wt2html", "Italics and possessives (2)"); add("wt2html", "Italicized possessive"); add("wt2html", "Non-word characters don't terminate tag names (bug 17663, 40670, 52022)"); add("wt2html", "Bare pipe character (bug 52363)"); @@ -46,7 +47,7 @@ add("wt2html", "Entities inside <nowiki>"); add("wt2html", "Comment on its own line post-expand"); add("wt2html", "Comment on its own line post-expand with non-significant whitespace"); -add("wt2html", "Bug 6200: Preformatted in <blockquote>"); +add("wt2html", "Tabs don't trigger preformatted text"); add("wt2html", "Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>"); add("wt2html", "Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>"); add("wt2html", "Templates: Indent-Pre: 1e. Wrapping should be based on expanded content"); @@ -55,7 +56,6 @@ add("wt2html", "2a. Indent-Pre and tables"); add("wt2html", "2b. Indent-Pre and tables"); add("wt2html", "2c. Indent-Pre and tables (bug 42252)"); -add("wt2html", "3b. Indent-Pre and block tags (pre-content on separate line)"); add("wt2html", "4. Multiple spaces at start-of-line"); add("wt2html", "6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content"); add("wt2html", "Definition Lists: Nesting: Multi-level (Parsoid only)"); @@ -84,7 +84,8 @@ add("wt2html", "Handling html with a div self-closing tag"); add("wt2html", "2. Lists with start-of-line-transparent tokens before bullets: Template close"); add("wt2html", "List interrupted by empty line or heading"); -add("wt2html", "Single-comment whitespace lines dont break lists, and so do multi-comment whitespace lines"); +add("wt2html", "Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines"); +add("wt2html", "Replacing whitespace with tabs still doesn't break the list (gerrit 78327)"); add("wt2html", "Test the li-hack\n(Cannot test this with PHP parser since it relies on Tidy for the hack)"); add("wt2html", "Unclosed formatting tags that straddle lists are closed and reopened\n(Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)"); add("wt2html", "Magic Word: {{CURRENTMONTH1}}"); @@ -414,6 +415,7 @@ add("wt2html", "anchorencode trims spaces"); add("wt2html", "anchorencode deals with links"); add("wt2html", "anchorencode encodes like the TOC generator: (bug 18431)"); +add("wt2html", "Bug 6200: blockquotes and paragraph formatting"); add("wt2html", "Parsing of overlapping (improperly nested) inline html tags (Parsoid)"); add("wt2html", "Self-link in language variants"); add("wt2html", "Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title"); @@ -534,7 +536,9 @@ // Blacklist for wt2wt add("wt2wt", "Italics and bold"); -add("wt2wt", "Italics and possessives"); +add("wt2wt", "Italics and possessives (1)"); +add("wt2wt", "Italics and possessives (2)"); +add("wt2wt", "Italics and possessives (3)"); add("wt2wt", "Italics and bold: 2-quote opening sequence: (2,3)"); add("wt2wt", "Italics and bold: 2-quote opening sequence: (2,4)"); add("wt2wt", "Italics and bold: 2-quote opening sequence: (2,5) (parsoid)"); @@ -559,6 +563,7 @@ add("wt2wt", "Bare pipe character (bug 52363)"); add("wt2wt", "Comment semantics: unclosed comment at end"); add("wt2wt", "Multiple lines without block tags"); +add("wt2wt", "Tabs don't trigger preformatted text"); add("wt2wt", "<nowiki> inside <pre> (bug 13238)"); add("wt2wt", "<nowiki> and <pre> preference (first one wins)"); add("wt2wt", "4. Multiple spaces at start-of-line"); @@ -596,6 +601,7 @@ add("wt2wt", "Horizontal ruler (should it add that extra space?)"); add("wt2wt", "Nested lists 3 (first element empty)"); add("wt2wt", "Nested lists 6 (both elements empty)"); +add("wt2wt", "Replacing whitespace with tabs still doesn't break the list (gerrit 78327)"); add("wt2wt", "Test the li-hack\n(Cannot test this with PHP parser since it relies on Tidy for the hack)"); add("wt2wt", "Unbalanced closing non-block tags don't break a list\n(Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)"); add("wt2wt", "Magic Word: {{CURRENTMONTH1}}"); @@ -720,7 +726,8 @@ add("html2html", "Extra newlines followed by heading"); add("html2html", "Extra newlines between heading and content are swallowed"); add("html2html", "Italics and bold"); -add("html2html", "Italics and possessives"); +add("html2html", "Italics and possessives (1)"); +add("html2html", "Italics and possessives (3)"); add("html2html", "Italics and bold: 2-quote opening sequence: (2,5) (parsoid)"); add("html2html", "Italics and bold: 3-quote opening sequence: (3,5) (parsoid)"); add("html2html", "Italics and bold: 4-quote opening sequence: (4,5) (parsoid)"); @@ -732,14 +739,13 @@ add("html2html", "<nowiki> spacing"); add("html2html", "nowiki 3"); add("html2html", "Preformatted text"); -add("html2html", "Bug 6200: Preformatted in <blockquote>"); +add("html2html", "Tabs don't trigger preformatted text"); add("html2html", "<pre> with attributes (bug 3202)"); add("html2html", "<pre> with width attribute (bug 3202)"); add("html2html", "<pre> with forbidden attribute (bug 3202)"); add("html2html", "<pre> with forbidden attribute values (bug 3202)"); add("html2html", "<nowiki> inside <pre> (bug 13238)"); add("html2html", "3a. Indent-Pre and block tags (single-line html)"); -add("html2html", "3b. Indent-Pre and block tags (pre-content on separate line)"); add("html2html", "4. Multiple spaces at start-of-line"); add("html2html", "6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content"); add("html2html", "HTML-pre: 1. embedded newlines"); @@ -850,7 +856,8 @@ add("html2html", "List items are not parsed correctly following a <pre> block (bug 785)"); add("html2html", "List interrupted by empty line or heading"); add("html2html", "Multiple list tags generated by templates"); -add("html2html", "Single-comment whitespace lines dont break lists, and so do multi-comment whitespace lines"); +add("html2html", "Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines"); +add("html2html", "Replacing whitespace with tabs still doesn't break the list (gerrit 78327)"); add("html2html", "Unbalanced closing block tags break a list\n(Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)"); add("html2html", "Unbalanced closing non-block tags don't break a list\n(Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)"); add("html2html", "List embedded in a non-block tag\n(Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)"); @@ -1218,7 +1225,9 @@ add("html2wt", "Extra newlines followed by heading"); add("html2wt", "Extra newlines between heading and content are swallowed"); add("html2wt", "Parsing an URL"); -add("html2wt", "Italics and possessives"); +add("html2wt", "Italics and possessives (1)"); +add("html2wt", "Italics and possessives (2)"); +add("html2wt", "Italics and possessives (3)"); add("html2wt", "Italics and bold: 2-quote opening sequence: (2,3)"); add("html2wt", "Italics and bold: 2-quote opening sequence: (2,4)"); add("html2wt", "Italics and bold: 2-quote opening sequence: (2,5) (parsoid)"); @@ -1266,11 +1275,10 @@ add("html2wt", "Multiple lines without block tags"); add("html2wt", "Empty lines between lines with block tags"); add("html2wt", "Preformatted text"); +add("html2wt", "Tabs don't trigger preformatted text"); add("html2wt", "<pre> with <nowiki> inside (compatibility with 1.6 and earlier)"); add("html2wt", "Regression with preformatted in <center>"); add("html2wt", "Bug 6200: Preformatted in <blockquote>"); -add("html2wt", "Bug 51086: Double newlines in blockquotes should be turned into paragraphs"); -add("html2wt", "Bug 15491: <ins>/<del> in blockquote"); add("html2wt", "<pre> with attributes (bug 3202)"); add("html2wt", "<pre> with width attribute (bug 3202)"); add("html2wt", "<pre> with forbidden attribute (bug 3202)"); @@ -1496,7 +1504,8 @@ add("html2wt", "List items from template"); add("html2wt", "List interrupted by empty line or heading"); add("html2wt", "Multiple list tags generated by templates"); -add("html2wt", "Single-comment whitespace lines dont break lists, and so do multi-comment whitespace lines"); +add("html2wt", "Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines"); +add("html2wt", "Replacing whitespace with tabs still doesn't break the list (gerrit 78327)"); add("html2wt", "Parsoid: Test of whitespace serialization with Templated bullets"); add("html2wt", "Unbalanced closing block tags break a list\n(Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)"); add("html2wt", "Unbalanced closing non-block tags don't break a list\n(Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)"); @@ -2202,18 +2211,45 @@ add("selser", "Italics and bold [[1,2,[2,0,2],3,[0,[3],4,0,2],0,1,4,1,2,[0,0,0,[2],0],3,1,4,[0,[0,3,0],0],2,1,0,1,4,[2,0,[2],2],0,1,0,[0,3,2],3,[0,[3],0],0,3]]"); add("selser", "Italics and bold [[4,2,4,3,1,4,1,0,[4,1,2,4,0],0,[0,[3],2,[2],0],3,[2,[3],0,4,0],3,4,2,[0,[3,2,0],0],2,[0,[[3],3],0],2,[0,1,2,4],0,[0,[0,3],2],3,[2,4,4],4,1,0,[2,4,0]]]"); add("selser", "Italics and bold [[[3],0,3,2,4,0,3,0,[2,3,0,1,4],0,[0,3,3,0,3],0,[0,0,0,0,4],0,1,2,[4,[0,2,3],4],0,[2,[0,3],4],0,[4,1,0,4],0,[4,4,2],0,[2,0,0],2,[2,0,0],0,[0,2,3]]]"); -add("selser", "Italics and possessives [2]"); -add("selser", "Italics and possessives [[3,2]]"); -add("selser", "Italics and possessives [1]"); -add("selser", "Italics and possessives [[3,[[3],[2]]]]"); -add("selser", "Italics and possessives [[3,[4,0]]]"); -add("selser", "Italics and possessives [[0,[2,0]]]"); -add("selser", "Italics and possessives [[0,[0,[2]]]]"); -add("selser", "Italics and possessives [[0,[3,[4]]]]"); -add("selser", "Italics and possessives [[0,1]]"); -add("selser", "Italics and possessives [[2,1]]"); -add("selser", "Italics and possessives [[4,1]]"); -add("selser", "Italics and possessives [[3,[0,[2]]]]"); +add("selser", "Italics and possessives (1) [1]"); +add("selser", "Italics and possessives (1) [[4,[1,[4]]]]"); +add("selser", "Italics and possessives (1) [2]"); +add("selser", "Italics and possessives (1) [[0,1]]"); +add("selser", "Italics and possessives (1) [[4,[[4],0]]]"); +add("selser", "Italics and possessives (1) [[2,2]]"); +add("selser", "Italics and possessives (1) [[0,2]]"); +add("selser", "Italics and possessives (1) [[2,[[3],0]]]"); +add("selser", "Italics and possessives (1) [[2,1]]"); +add("selser", "Italics and possessives (1) [[4,1]]"); +add("selser", "Italics and possessives (1) [[3,0]]"); +add("selser", "Italics and possessives (2) [[2,[0,4,0],4]]"); +add("selser", "Italics and possessives (2) [1]"); +add("selser", "Italics and possessives (2) [[2,3,0]]"); +add("selser", "Italics and possessives (2) [[[[4]],4,0]]"); +add("selser", "Italics and possessives (2) [[[[4]],0,2]]"); +add("selser", "Italics and possessives (2) [2]"); +add("selser", "Italics and possessives (2) [[1,4,0]]"); +add("selser", "Italics and possessives (2) [[0,[0,3,0],0]]"); +add("selser", "Italics and possessives (2) [[[2],2,4]]"); +add("selser", "Italics and possessives (2) [[[[2]],3,3]]"); +add("selser", "Italics and possessives (2) [[4,[0,[2],4],3]]"); +add("selser", "Italics and possessives (2) [[2,1,4]]"); +add("selser", "Italics and possessives (2) [[[2],[0,0,4],0]]"); +add("selser", "Italics and possessives (2) [[2,4,4]]"); +add("selser", "Italics and possessives (3) [[2,[3],0,0,4,3,3,0,4]]"); +add("selser", "Italics and possessives (3) [[0,[2],0,2,0,2,2,2,2]]"); +add("selser", "Italics and possessives (3) [1]"); +add("selser", "Italics and possessives (3) [[0,[4],3,4,4,[2,[2]],3,[4],0]]"); +add("selser", "Italics and possessives (3) [[3,0,0,1,0,2,0,0,0]]"); +add("selser", "Italics and possessives (3) [2]"); +add("selser", "Italics and possessives (3) [[0,2,2,2,0,3,3,4,0]]"); +add("selser", "Italics and possessives (3) [[0,2,0,[3],4,[4,1],0,0,0]]"); +add("selser", "Italics and possessives (3) [[0,2,0,1,3,2,0,2,0]]"); +add("selser", "Italics and possessives (3) [[0,0,0,[3],4,[0,1],3,4,3]]"); +add("selser", "Italics and possessives (3) [[2,[4],0,3,0,[0,1],0,[3],2]]"); +add("selser", "Italics and possessives (3) [[0,2,0,0,2,3,3,0,0]]"); +add("selser", "Italics and possessives (3) [[0,[3],0,1,3,1,0,2,0]]"); +add("selser", "Italics and possessives (3) [[0,0,0,1,3,4,0,0,0]]"); add("selser", "Italics and bold: 2-quote opening sequence: (2,3) [1]"); add("selser", "Italics and bold: 2-quote opening sequence: (2,3) [[[2]]]"); add("selser", "Italics and bold: 2-quote opening sequence: (2,3) [2]"); @@ -2440,6 +2476,18 @@ add("selser", "Comment semantics: unclosed comment at end [2]"); add("selser", "Multiple lines without block tags [0,4,1,0,3,0,4]"); add("selser", "Multiple lines without block tags [[3],3,1,4,0,0,2]"); +add("selser", "Tabs don't trigger preformatted text [4,[3]]"); +add("selser", "Tabs don't trigger preformatted text [3,2]"); +add("selser", "Tabs don't trigger preformatted text [4,2]"); +add("selser", "Tabs don't trigger preformatted text [2,[2]]"); +add("selser", "Tabs don't trigger preformatted text [0,[3]]"); +add("selser", "Tabs don't trigger preformatted text [3,0]"); +add("selser", "Tabs don't trigger preformatted text [0,2]"); +add("selser", "Tabs don't trigger preformatted text [0,[2]]"); +add("selser", "Tabs don't trigger preformatted text [3,[3]]"); +add("selser", "Tabs don't trigger preformatted text [2,0]"); +add("selser", "Tabs don't trigger preformatted text [2,2]"); +add("selser", "Tabs don't trigger preformatted text [4,0]"); add("selser", "<nowiki> inside <pre> (bug 13238) [4,2,2,0,0]"); add("selser", "<nowiki> inside <pre> (bug 13238) [0,0,4,0,[[4],0,2,4]]"); add("selser", "<nowiki> inside <pre> (bug 13238) [3,0,3,3,2]"); @@ -3055,6 +3103,11 @@ add("selser", "Nested lists 7 (skip initial nesting levels) [[[[[1]]]]]"); add("selser", "List interrupted by empty line or heading [[1],0,[1],2,3,0,0]"); add("selser", "List interrupted by empty line or heading [[[4]],4,[[1]],0,[3],2,2]"); +add("selser", "Replacing whitespace with tabs still doesn't break the list (gerrit 78327) [0,4,4,4,[[4]],4,3,3,0,4,3,4,2,4,2,0,[[4]]]"); +add("selser", "Replacing whitespace with tabs still doesn't break the list (gerrit 78327) [[4],2,0,0,1,2,0,4,0,0,2,2,0,3,0,3,2]"); +add("selser", "Replacing whitespace with tabs still doesn't break the list (gerrit 78327) [[4],3,0,0,2,2,3,3,[[4]],0,2,0,0,3,0,2,0]"); +add("selser", "Replacing whitespace with tabs still doesn't break the list (gerrit 78327) [2,3,2,2,[2],2,4,0,0,3,4,4,4,0,2,0,4]"); +add("selser", "Replacing whitespace with tabs still doesn't break the list (gerrit 78327) [[3],3,3,4,1,2,3,2,[[3]],0,0,4,0,3,2,2,1]"); add("selser", "Test the li-hack\n(Cannot test this with PHP parser since it relies on Tidy for the hack) [1,2,[3,2,[3],0]]"); add("selser", "Test the li-hack\n(Cannot test this with PHP parser since it relies on Tidy for the hack) [[1,0,0,0,0,0,[0,2,2],2],2,[2,0,[4],4]]"); add("selser", "Test the li-hack\n(Cannot test this with PHP parser since it relies on Tidy for the hack) [[4,2,[3],0,0,0,[4,2,3],3],0,2]"); diff --git a/js/tests/parserTests.txt b/js/tests/parserTests.txt index d997df2..146f867 100644 --- a/js/tests/parserTests.txt +++ b/js/tests/parserTests.txt @@ -447,15 +447,36 @@ !! end -# this example taken from the simple/Moon article +# this example taken from the [[simple:Moon]] article (bug 47326) !! test -Italics and possessives +Italics and possessives (1) !! input obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer !! result <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer </p> !! end + +# this example taken from [[en:Flaming Pie]] (bug 49926) +!! test +Italics and possessives (2) +!! input +'''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes +!! result +<p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes +</p> +!! end + +# this example taken from [[en:Dictionary]] (bug 49926) +!! test +Italics and possessives (3) +!! input +The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''. +!! result +<p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>. +</p> +!! end + ### ### 2-quote opening sequence tests @@ -1311,6 +1332,22 @@ !! end !! test +Tabs don't trigger preformatted text +!! input + This is not + preformatted text. + This is preformatted text. + So is this. +!! result +<p> This is not + preformatted text. +</p> +<pre>This is preformatted text. + So is this. +</pre> +!! end + +!! test Ident preformatting with inline content !! input a @@ -1352,6 +1389,8 @@ !! end +# Expected output in the following test is not really expected (there should be +# <pre> in the output) -- it's only testing for well-formedness. !! test Bug 6200: Preformatted in <blockquote> !! input @@ -1360,53 +1399,7 @@ </blockquote> !! result <blockquote> -<pre>Blah -</pre> -</blockquote> - -!! end - -!! test -Bug 51086: Double newlines in blockquotes should be turned into paragraphs -!! input -<blockquote> -Foo - -Bar -</blockquote> -!! result -<blockquote> -<p>Foo -</p><p>Bar -</p> -</blockquote> - -!! end - -!! test -Bug 15491: <ins>/<del> in blockquote -!! input -<blockquote> -Foo <del>bar</del> <ins>baz</ins> quux -</blockquote> -!! result -<blockquote> -<p>Foo <del>bar</del> <ins>baz</ins> quux -</p> -</blockquote> - -!! end - -# Note that the p-wrapping is newline sensitive, which could be -# considered a bug: tidy will wrap only the 'Foo' in the example -# below in a <p> tag. (see comment 23-25 of bug #6200) -!! test -Bug 15491: <ins>/<del> in blockquote (2) -!! input -<blockquote>Foo <del>bar</del> <ins>baz</ins> quux -</blockquote> -!! result -<blockquote>Foo <del>bar</del> <ins>baz</ins> quux + Blah </blockquote> !! end @@ -1937,8 +1930,7 @@ </pre> </center> <blockquote> -<pre>foo -</pre> + foo </blockquote> <table><tr><td> <pre>foo @@ -5644,7 +5636,7 @@ !!end !!test -Single-comment whitespace lines dont break lists, and so do multi-comment whitespace lines +Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines !!input *a <!--This line will NOT split the list--> @@ -5652,6 +5644,26 @@ <!--This line will NOT split the list either--> *c <!--foo--> <!----> <!--This line NOT split the list either--> +*d +!!result +<ul><li>a +</li><li>b +</li><li>c +</li><li>d +</li></ul> + +!!end + +!!test +Replacing whitespace with tabs still doesn't break the list (gerrit 78327) +!!input +*a +<!--This line will NOT split the list--> +*b + <!--This line will NOT split the list either--> +*c + <!--foo--> <!----> <!--This line NOT split the list + either--> *d !!result <ul><li>a @@ -12866,40 +12878,40 @@ * image6 </gallery> !! result -<ul class="gallery"> +<ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> - <div style="height: 150px;">Image1.png</div> + <div class="thumb" style="height: 150px;">Image1.png</div> <div class="gallerytext"> </div> </div></li> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> - <div style="height: 150px;">Image2.gif</div> + <div class="thumb" style="height: 150px;">Image2.gif</div> <div class="gallerytext"> <p>|||| </p> </div> </div></li> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> - <div style="height: 150px;">Image3</div> + <div class="thumb" style="height: 150px;">Image3</div> <div class="gallerytext"> </div> </div></li> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> - <div style="height: 150px;">Image4</div> + <div class="thumb" style="height: 150px;">Image4</div> <div class="gallerytext"> <p>300px| centre </p> </div> </div></li> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> - <div style="height: 150px;">Image5.svg</div> + <div class="thumb" style="height: 150px;">Image5.svg</div> <div class="gallerytext"> <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a> </p> </div> </div></li> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> - <div style="height: 150px;">* image6</div> + <div class="thumb" style="height: 150px;">* image6</div> <div class="gallerytext"> </div> </div></li> @@ -12918,17 +12930,17 @@ image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla. </gallery> !! result -<ul class="gallery" style="max-width: 226px;_width: 226px;"> +<ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;"> <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li> <li class="gallerybox" style="width: 105px"><div style="width: 105px"> - <div style="height: 70px;">Nonexistant.jpg</div> + <div class="thumb" style="height: 70px;">Nonexistant.jpg</div> <div class="gallerytext"> <p>caption </p> </div> </div></li> <li class="gallerybox" style="width: 105px"><div style="width: 105px"> - <div style="height: 70px;">Nonexistant.jpg</div> + <div class="thumb" style="height: 70px;">Nonexistant.jpg</div> <div class="gallerytext"> </div> </div></li> @@ -12963,7 +12975,7 @@ File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt </gallery> !! result -<ul class="gallery"> +<ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div> <div class="gallerytext"> @@ -12992,9 +13004,9 @@ File:Foobar.jpg </gallery> !! result -<ul class="gallery"> +<ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> - <div style="height: 150px;">Nonexistant.jpg</div> + <div class="thumb" style="height: 150px;">Nonexistant.jpg</div> <div class="gallerytext"> <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br /> caption @@ -13002,7 +13014,7 @@ </div> </div></li> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> - <div style="height: 150px;">Nonexistant.jpg</div> + <div class="thumb" style="height: 150px;">Nonexistant.jpg</div> <div class="gallerytext"> <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br /> </p> @@ -13037,14 +13049,14 @@ foobar.jpg </gallery> !! result -<ul class="gallery"> +<ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> - <div style="height: 150px;">Nonexistant.jpg</div> + <div class="thumb" style="height: 150px;">Nonexistant.jpg</div> <div class="gallerytext"> </div> </div></li> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> - <div style="height: 150px;">Nonexistant.jpg</div> + <div class="thumb" style="height: 150px;">Nonexistant.jpg</div> <div class="gallerytext"> </div> </div></li> @@ -13598,6 +13610,9 @@ </p> !! end +# Expected output in the following test is not necessarily expected (there +# should probably be <p> tags inside the <blockquote> in the output) -- it's +# only testing for well-formedness. !! test Bug 6200: blockquotes and paragraph formatting !! input @@ -13610,8 +13625,7 @@ baz !! result <blockquote> -<p>foo -</p> +foo </blockquote> <p>bar </p> @@ -14291,6 +14305,8 @@ # Bug 6200: <blockquote> should behave like <div> with respect to line breaks !! test Bug 6200: paragraphs inside blockquotes (no extra line breaks) +!! options +disabled !! input <blockquote>Line one @@ -14303,6 +14319,8 @@ !! test Bug 6200: paragraphs inside blockquotes (extra line break on open) +!! options +disabled !! input <blockquote> Line one @@ -14318,6 +14336,8 @@ !! test Bug 6200: paragraphs inside blockquotes (extra line break on close) +!! options +disabled !! input <blockquote>Line one @@ -14333,6 +14353,8 @@ !! test Bug 6200: paragraphs inside blockquotes (extra line break on open and close) +!! options +disabled !! input <blockquote> Line one @@ -15346,7 +15368,7 @@ File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink </gallery> !! result -<ul class="gallery"> +<ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/InterWikiLink"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div> <div class="gallerytext"> @@ -15365,7 +15387,7 @@ File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org </gallery> !! result -<ul class="gallery"> +<ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="http://www.example.org"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div> <div class="gallerytext"> @@ -15384,7 +15406,7 @@ File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!'); </gallery> !! result -<ul class="gallery"> +<ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/%22_onclick%3D%22alert(%27malicious_javascript_code!%27);"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div> <div class="gallerytext"> @@ -15403,7 +15425,7 @@ File:foobar.jpg|link=< </gallery> !! result -<ul class="gallery"> +<ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"><div style="width: 155px"> <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div> <div class="gallerytext"> -- To view, visit https://gerrit.wikimedia.org/r/79427 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a8281a67e1978459a1f14dd4503ea1e497a8fe8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Cscott <canan...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits