diff options
author | Andreas Gohr <andi@splitbrain.org> | 2011-10-15 11:23:20 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2011-10-15 11:23:20 +0200 |
commit | 46213daa86e91437d10a0bc603399f4d999b04ca (patch) | |
tree | ebbe7dd14a8e3dd553c5e0bc1102f1d5a3383fa3 /inc/parser/handler.php | |
parent | db8363816a3a2e671f8e3246170fef94e8f4cf80 (diff) | |
download | rpg-46213daa86e91437d10a0bc603399f4d999b04ca.tar.gz rpg-46213daa86e91437d10a0bc603399f4d999b04ca.tar.bz2 |
cleanup of handler.php
The file contained a few DOS lineendings and trailing spaces
Diffstat (limited to 'inc/parser/handler.php')
-rw-r--r-- | inc/parser/handler.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 22a50d1b7..0e54425f7 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -1489,10 +1489,10 @@ class Doku_Handler_Block { } } - function openParagraph($pos){
+ function openParagraph($pos){ if ($this->inParagraph) return; $this->calls[] = array('p_open',array(), $pos); - $this->inParagraph = true;
+ $this->inParagraph = true; $this->skipEol = true; } @@ -1503,7 +1503,7 @@ class Doku_Handler_Block { * * @author Andreas Gohr <andi@splitbrain.org> */ - function closeParagraph($pos){
+ function closeParagraph($pos){ if (!$this->inParagraph) return; // look back if there was any content - we don't want empty paragraphs $content = ''; @@ -1521,17 +1521,17 @@ class Doku_Handler_Block { if(trim($content)==''){ //remove the whole paragraph array_splice($this->calls,$i); - }else{
- // remove ending linebreaks in the paragraph
- $i=count($this->calls)-1;
+ }else{ + // remove ending linebreaks in the paragraph + $i=count($this->calls)-1; if ($this->calls[$i][0] == 'cdata') $this->calls[$i][1][0] = rtrim($this->calls[$i][1][0],DOKU_PARSER_EOL); $this->calls[] = array('p_close',array(), $pos); } - $this->inParagraph = false;
+ $this->inParagraph = false; $this->skipEol = true; } - + function addCall($call) { $key = count($this->calls); if ($key and ($call[0] == 'cdata') and ($this->calls[$key-1][0] == 'cdata')) { @@ -1553,7 +1553,7 @@ class Doku_Handler_Block { * @author Andreas Gohr <andi@splitbrain.org> */ function process($calls) { - // open first paragraph
+ // open first paragraph $this->openParagraph(0); foreach ( $calls as $key => $call ) { $cname = $call[0]; |