summaryrefslogtreecommitdiff
path: root/inc/parser/parser.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/parser/parser.php')
-rw-r--r--inc/parser/parser.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/parser/parser.php b/inc/parser/parser.php
index b93760f3a..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() {
@@ -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;