summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-04-22 13:13:30 +0200
committerandi <andi@splitbrain.org>2005-04-22 13:13:30 +0200
commit58b56c06b2faa9a63bc301bd437972956880e6fa (patch)
tree8443345d41693ba5c72fcf61d1ec17327234906e
parent433bef32d237280f4b789c93c0b33f863533e8b4 (diff)
downloadrpg-58b56c06b2faa9a63bc301bd437972956880e6fa.tar.gz
rpg-58b56c06b2faa9a63bc301bd437972956880e6fa.tar.bz2
fixed paragraph control
darcs-hash:20050422111330-9977f-49c1d37044084e1b0fd3d379f77df55d1c1557eb.gz
-rw-r--r--inc/parser/handler.php29
1 files changed, 28 insertions, 1 deletions
diff --git a/inc/parser/handler.php b/inc/parser/handler.php
index 9f8dc3076..23c830abf 100644
--- a/inc/parser/handler.php
+++ b/inc/parser/handler.php
@@ -1156,6 +1156,7 @@ class Doku_Handler_Block {
var $inParagraph = FALSE;
var $atStart = TRUE;
+ var $skipEolKey = -1;
// Blocks don't contain linefeeds
var $blockOpen = array(
@@ -1221,12 +1222,38 @@ class Doku_Handler_Block {
if ( !$this->atStart ) {
if ( $call[0] == 'eol' ) {
-
+
+
+ /* XXX
if ( $this->inParagraph ) {
$this->calls[] = array('p_close',array(), $call[2]);
}
$this->calls[] = array('p_open',array(), $call[2]);
$this->inParagraph = TRUE;
+ */
+
+ # Check this isn't an eol instruction to skip...
+ if ( $this->skipEolKey != $key ) {
+ # Look to see if the next instruction is an EOL
+ if ( isset($calls[$key+1]) && $calls[$key+1][0] == 'eol' ) {
+
+ if ( $this->inParagraph ) {
+ $this->calls[] = array('p_close',array(), $call[2]);
+ }
+
+ $this->calls[] = array('p_open',array(), $call[2]);
+ $this->inParagraph = TRUE;
+
+
+ # Mark the next instruction for skipping
+ $this->skipEolKey = $key+1;
+
+ }else{
+ //if this is just a single eol make a space from it
+ $this->calls[] = array('cdata',array(" "), $call[2]);
+ }
+ }
+
} else {