From a163fa3c556113ec03672dd029909bab57816fdf Mon Sep 17 00:00:00 2001 From: Leo Koppelkamm Date: Thu, 14 Apr 2011 18:45:04 +0000 Subject: [PATCH] Fix for r85990, which broke lists inside tables; adding test for it --- includes/parser/Parser.php | 2 +- tests/parser/parserTests.txt | 68 ++++++++++++++++++++++++++++++++++-- 2 files changed, 66 insertions(+), 4 deletions(-) diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index f3ba2b53f8..6cf1e2bf18 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -966,7 +966,7 @@ class Parser { $output =& $currentElement['content']; } else { - $output .= "\n$outLine\n"; + $output .= "\n$outLine"; } } diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 6be8e2435d..af62b25e5e 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -1403,7 +1403,69 @@ Table with thead & tfoot +!! end + +!! test +Table with list inside +!! input +{| +|style="width: 5em; text-align: center"| gives +|style="border: 1px dashed #2F6FAB; padding: 0.5em; margin: 0.5em"| +# Some +# list +# Lorem +# ipsum +# dolor +|} +!! result + + + + + +
gives + +
  1. Some +
  2. list +
  3. Lorem +
  4. ipsum +
  5. dolor +
+
+ !! end +!! test +Simple paragraph +!! input +This is a simple paragraph. +!! result +

This is a simple paragraph. +

+!! end + +!! test +Table with multiline contents +!! input +{| +| Alice +Bob +dfdfg +dfg +|} +!! result + + + + +
Alice +

Bob +dfdfg +dfg +

+
+ +!! end + !! test Multiplication table !! input @@ -5902,9 +5964,9 @@ MOVE YOUR MOUSE CURSOR OVER THIS TEXT | !! result

{{{| -

}}}} > -


-

MOVE YOUR MOUSE CURSOR OVER THIS TEXT +}}}} > +
+MOVE YOUR MOUSE CURSOR OVER THIS TEXT

-- 2.20.1