summaryrefslogtreecommitdiff
path: root/inc/parser
diff options
context:
space:
mode:
Diffstat (limited to 'inc/parser')
-rw-r--r--inc/parser/handler.php6
-rw-r--r--inc/parser/parser.php4
2 files changed, 8 insertions, 2 deletions
diff --git a/inc/parser/handler.php b/inc/parser/handler.php
index e7eb94dd2..22a50d1b7 100644
--- a/inc/parser/handler.php
+++ b/inc/parser/handler.php
@@ -720,6 +720,7 @@ class Doku_Handler_CallWriter {
// function is required, but since this call writer is first/highest in
// the chain it is not required to do anything
function finalise() {
+ unset($this->Handler);
}
}
@@ -764,6 +765,7 @@ class Doku_Handler_Nest {
$this->process();
$this->CallWriter->finalise();
+ unset($this->CallWriter);
}
function process() {
@@ -817,6 +819,7 @@ class Doku_Handler_List {
$this->process();
$this->CallWriter->finalise();
+ unset($this->CallWriter);
}
//------------------------------------------------------------------------
@@ -1014,6 +1017,7 @@ class Doku_Handler_Preformatted {
$this->process();
$this->CallWriter->finalise();
+ unset($this->CallWriter);
}
function process() {
@@ -1070,6 +1074,7 @@ class Doku_Handler_Quote {
$this->process();
$this->CallWriter->finalise();
+ unset($this->CallWriter);
}
function process() {
@@ -1165,6 +1170,7 @@ class Doku_Handler_Table {
$this->process();
$this->CallWriter->finalise();
+ unset($this->CallWriter);
}
//------------------------------------------------------------------------
diff --git a/inc/parser/parser.php b/inc/parser/parser.php
index b93760f3a..a7764ee9c 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() {
@@ -870,7 +870,7 @@ class Doku_Parser_Mode_externallink extends Doku_Parser_Mode {
if(count($this->patterns)) return;
$ltrs = '\w';
- $gunk = '/\#~:.?+=&%@!\-';
+ $gunk = '/\#~:.?+=&%@!\-\[\]';
$punc = '.:?\-;,';
$host = $ltrs.$punc;
$any = $ltrs.$gunk.$punc;