summaryrefslogtreecommitdiff
path: root/inc/parser/handler.php
diff options
context:
space:
mode:
authorAdrian Lang <mail@adrianlang.de>2010-10-07 09:44:02 +0200
committerAdrian Lang <mail@adrianlang.de>2010-10-07 09:44:02 +0200
commitd9c8ae6b7379d7b64d4817dbd5cca276b45a9dd5 (patch)
tree39c26d5412170ca4fa176962e60e9962dc643667 /inc/parser/handler.php
parent2c053ed58376c6709596ab48fc40dceb90d4e89d (diff)
parent85dd53ceb1c2d9a7abe01b5ec50d155dcb142c59 (diff)
downloadrpg-d9c8ae6b7379d7b64d4817dbd5cca276b45a9dd5.tar.gz
rpg-d9c8ae6b7379d7b64d4817dbd5cca276b45a9dd5.tar.bz2
Merge branch 'master' into stable
Diffstat (limited to 'inc/parser/handler.php')
-rw-r--r--inc/parser/handler.php25
1 files changed, 17 insertions, 8 deletions
diff --git a/inc/parser/handler.php b/inc/parser/handler.php
index 0b8b79254..a96e6b9db 100644
--- a/inc/parser/handler.php
+++ b/inc/parser/handler.php
@@ -440,7 +440,7 @@ class Doku_Handler {
array($link[0],$link[1],strtolower($interwiki[0]),$interwiki[1]),
$pos
);
- }elseif ( preg_match('/^\\\\\\\\[\w.:?\-;,]+?\\\\/u',$link[0]) ) {
+ }elseif ( preg_match('/^\\\\\\\\[^\\\\]+?\\\\/u',$link[0]) ) {
// Windows Share
$this->_addCall(
'windowssharelink',
@@ -1543,14 +1543,12 @@ class Doku_Handler_Block {
// Process blocks which are stack like... (contain linefeeds)
if ( in_array($cname,$this->stackOpen ) && (!$plugin || $plugin_open) ) {
- $this->calls[] = $call;
-
// Hack - footnotes shouldn't immediately contain a p_open
- if ( $cname != 'footnote_open' ) {
- $this->addToStack();
- } else {
- $this->addToStack(false);
+ if ($this->addToStack($cname != 'footnote_open')) {
+ $this->closeParagraph($call[2]);
}
+ $this->calls[] = $call;
+
continue;
}
@@ -1560,7 +1558,9 @@ class Doku_Handler_Block {
$this->closeParagraph($call[2]);
}
$this->calls[] = $call;
- $this->removeFromStack();
+ if ($this->removeFromStack()) {
+ $this->calls[] = array('p_open',array(), $call[2]);
+ }
continue;
}
@@ -1676,16 +1676,25 @@ class Doku_Handler_Block {
return $this->calls;
}
+ /**
+ *
+ * @return bool true when a p_close() is required
+ */
function addToStack($newStart = true) {
+ $ret = $this->inParagraph;
$this->blockStack[] = array($this->atStart, $this->inParagraph);
$this->atStart = $newStart;
$this->inParagraph = false;
+
+ return $ret;
}
function removeFromStack() {
$state = array_pop($this->blockStack);
$this->atStart = $state[0];
$this->inParagraph = $state[1];
+
+ return $this->inParagraph;
}
function addCall($call) {