diff options
-rw-r--r-- | _test/cases/inc/parser/parser_footnote.test.php | 5 | ||||
-rw-r--r-- | inc/parser/handler.php | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/_test/cases/inc/parser/parser_footnote.test.php b/_test/cases/inc/parser/parser_footnote.test.php index edb5778ff..2b00a0b2e 100644 --- a/_test/cases/inc/parser/parser_footnote.test.php +++ b/_test/cases/inc/parser/parser_footnote.test.php @@ -203,6 +203,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); + $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); } @@ -258,7 +259,6 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('cdata',array("\n".'Foo ')), array('nest', array ( array ( array('footnote_open',array()), - array('cdata',array(' ')), array('table_open',array(3,2)), array('tablerow_open',array()), array('tablecell_open',array(1,'left',1)), @@ -306,7 +306,6 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('cdata',array("\n".'Foo ')), array('nest', array ( array ( array('footnote_open',array()), - array('cdata',array(' ')), array('listu_open',array()), array('listitem_open',array(1)), array('listcontent_open',array()), @@ -348,7 +347,6 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('cdata',array("\n".'Foo ')), array('nest', array ( array ( array('footnote_open',array()), - array('cdata',array(' ')), array('quote_open',array()), array('cdata',array(" def")), array('quote_open',array()), @@ -362,6 +360,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('p_close',array()), array('document_end',array()), ); + $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls); } diff --git a/inc/parser/handler.php b/inc/parser/handler.php index c9a4fd6d9..9fe5866ad 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -802,6 +802,8 @@ class Doku_Handler_Nest { $key = count($this->calls); if ($key and ($call[0] == 'cdata') and ($this->calls[$key-1][0] == 'cdata')) { $this->calls[$key-1][1][0] .= $call[1][0]; + } else if ($call[0] == 'eol') { + // do nothing (eol shouldn't be allowed, to counter preformatted fix in #1652 & #1699) } else { $this->calls[] = $call; } |