summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Smith <chris.eureka@jalakai.co.uk>2009-12-01 21:54:26 +0100
committerChris Smith <chris.eureka@jalakai.co.uk>2009-12-01 21:54:26 +0100
commit73c47f3d66730ad8d2529bfbb3f5d5cd747b3f87 (patch)
tree79a996a2cba126f544c3c3474f1c510252afc766
parent91c115b682b9006259195d90d285ed5687f4b42c (diff)
downloadrpg-73c47f3d66730ad8d2529bfbb3f5d5cd747b3f87.tar.gz
rpg-73c47f3d66730ad8d2529bfbb3f5d5cd747b3f87.tar.bz2
fix footnote tests (includes hack to counter #1652, #1699 fix)
Ignore-this: c5a934d8bce1c2b5953632bedd0c4f64 darcs-hash:20091201205426-f07c6-e21cbc5f84a8702f074069eae3cab1aa4bdb50ea.gz
-rw-r--r--_test/cases/inc/parser/parser_footnote.test.php5
-rw-r--r--inc/parser/handler.php2
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;
}