From 5a41afe6e3b958291893a0a10105cd41971fb141 Mon Sep 17 00:00:00 2001
From: Christopher Smith <chris@jalakai.co.uk>
Date: Sun, 1 Dec 2013 17:57:03 +0000
Subject: FS#1833 (b) Prevent table entry syntax swallowing multiple preceeding
 blank lines (a) this shouldn't be necessary, blank lines are handled by
 paragraph     processing (b) avoids issues with greedy table syntax competing
 with plugins

---
 _test/tests/inc/parser/parser_table.test.php | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

(limited to '_test/tests/inc/parser/parser_table.test.php')

diff --git a/_test/tests/inc/parser/parser_table.test.php b/_test/tests/inc/parser/parser_table.test.php
index 542a307b8..bc19ebff9 100644
--- a/_test/tests/inc/parser/parser_table.test.php
+++ b/_test/tests/inc/parser/parser_table.test.php
@@ -626,5 +626,24 @@ def');
         );
         $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
     }
+
+    function testTable_FS1833() {
+        $syntax = " \n| Row 0 Col 1    |\n";
+        $this->P->addMode('table',new Doku_Parser_Mode_Table());
+        $this->P->parse($syntax);
+        $calls = array (
+            array('document_start',array()),
+            array('table_open',array(1, 1, 2)),
+            array('tablerow_open',array()),
+            array('tablecell_open',array(1,'left',1)),
+            array('cdata',array(' Row 0 Col 1    ')),
+            array('tablecell_close',array()),
+            array('tablerow_close',array()),
+            array('table_close',array(strlen($syntax))),
+            array('document_end',array()),
+        );
+        $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+    }
+
 }
 
-- 
cgit v1.2.3