From 0a0cb73f4dd6aede60c911518b142c24e612c1af Mon Sep 17 00:00:00 2001 From: umherirrender Date: Wed, 16 Jul 2014 11:28:25 +0200 Subject: [PATCH] Add parser tests for tables with pipes and wikilinks Change-Id: Ifd6c8eb9a9f951b9aa9f21a95d77915905220063 --- tests/parser/parserTests.txt | 62 ++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 648c495bf3..e9072b1c1c 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -5664,6 +5664,68 @@ Build table with {{!}} !! end +!! test +Build table with pipe as data +!! wikitext +{| class="wikitable" +! header +! second header +|- style="color:red;" +| data || style="color:red;" | second data +|- +| style="color:red;" | data with | || style="color:red;" | second data with | +|- +|| data with | ||| second data with | +|} +!! html + + + + + + + + + + + + +
header + second header +
data second data +
data with | second data with | +
data with | second data with | +
+ +!! end + +!! test +Build table with wikilink +!! wikitext +{| class="wikitable" +! header || second header +|- style="color:red;" +| data [[Main Page|linktext]] || second data [[Main Page|linktext]] +|- +| data || second data [[Main Page|link|text with pipe]] +|} +!! html + + + + + + + + + +
header second header +
data linktext second data linktext +
data second data link|text with pipe +
+ +!! end + # The expected HTML structure in this test is debatable. The PHP parser does # not parse this kind of table at all. The main focus for Parsoid is on # round-tripping, so this output is ok for now. TODO: revisit! -- 2.20.1