diff options
Diffstat (limited to 'inc/parser')
-rw-r--r-- | inc/parser/handler.php | 16 | ||||
-rw-r--r-- | inc/parser/metadata.php | 8 | ||||
-rw-r--r-- | inc/parser/parser.php | 2 | ||||
-rw-r--r-- | inc/parser/xhtml.php | 2 |
4 files changed, 14 insertions, 14 deletions
diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 26a560c3c..22a50d1b7 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,14 +1521,14 @@ 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; } @@ -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]; diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php index bd396e2b4..fc2c8cbc5 100644 --- a/inc/parser/metadata.php +++ b/inc/parser/metadata.php @@ -455,16 +455,16 @@ class Doku_Renderer_metadata extends Doku_Renderer { global $conf; $isImage = false; - if (is_array($title)){ - if($title['title']) return '['.$title['title'].']'; - } else if (is_null($title) || trim($title)==''){ + if (is_null($title)){ if (useHeading('content') && $id){ $heading = p_get_first_heading($id,false); if ($heading) return $heading; } return $default; - } else { + } else if (is_string($title)){ return $title; + } else if (is_array($title)){ + if($title['title']) return '['.$title['title'].']'; } } diff --git a/inc/parser/parser.php b/inc/parser/parser.php index a7764ee9c..e47ce56fa 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -828,7 +828,7 @@ class Doku_Parser_Mode_internallink extends Doku_Parser_Mode { function connectTo($mode) { // Word boundaries? - $this->Lexer->addSpecialPattern("\[\[(?:(?:.*?\[.*?\])|.+?)\]\]",$mode,'internallink'); + $this->Lexer->addSpecialPattern("\[\[(?:(?:[^[\]]*?\[.*?\])|.+?)\]\]",$mode,'internallink'); } function getSort() { diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index b502b4f6b..9405d9420 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -29,7 +29,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { var $doc = ''; // will contain the whole document var $toc = array(); // will contain the Table of Contents - var $sectionedits = array(); // A stack of section edit data + private $sectionedits = array(); // A stack of section edit data var $headers = array(); var $footnotes = array(); |