summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/parser/xhtml.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 841e92f08..649c2d5c0 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -94,7 +94,10 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
// make sure there are no empty paragraphs
$this->doc = preg_replace('#<p>\s*</p>#','',$this->doc);
- if ($conf['purplenumbers']) $this->doc = preg_replace('#<p[^>]*>\s*<!--PN-->.*?(?:</p>)#','',$this->doc);
+ if ($conf['purplenumbers']) {
+ $this->doc = preg_replace('#<p[^>]*>\s*<!--PN-->.*?(?:</p>)#','',$this->doc);
+ $this->doc = preg_replace('/<!--PN-->/','',$this->doc);
+ }
}
function toc_additem($id, $text, $level) {
@@ -1119,7 +1122,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
} else {
$prefix = 'HID';
}
- return $prefix.rtrim(join('.',$this->node),'.0').rtrim(':'.$this->pnid,':0');
+ return $prefix.preg_replace('/[\.0]*$/','',join('.',$this->node)).str_replace(':0','',':'.$this->pnid);
}
/**