From: umherirrender Date: Wed, 16 Jul 2014 09:28:25 +0000 (+0200) Subject: Add parser tests for tables with pipes and wikilinks X-Git-Tag: 1.31.0-rc.0~13022^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=0a0cb73f4dd6aede60c911518b142c24e612c1af;p=lhc%2Fweb%2Fwiklou.git Add parser tests for tables with pipes and wikilinks Change-Id: Ifd6c8eb9a9f951b9aa9f21a95d77915905220063 --- 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!