summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-04-29 17:03:42 +0200
committerandi <andi@splitbrain.org>2005-04-29 17:03:42 +0200
commitbd1110793682d2b93f5f67e30ebfc4310605c829 (patch)
treed0bc7f29e1468e0c7d64049ceb47c7f0f23fb5df
parent702eb8985f33ca5781d2da5cedd9d6a4b9c6a030 (diff)
downloadrpg-bd1110793682d2b93f5f67e30ebfc4310605c829.tar.gz
rpg-bd1110793682d2b93f5f67e30ebfc4310605c829.tar.bz2
use anchor name on titles
darcs-hash:20050429150342-9977f-78c6a2246791d9342462b770b303c19f5dff62cb.gz
-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 a132d4f4b..63f79d17c 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -839,15 +839,18 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
*/
function _simpleTitle($name){
global $conf;
+
if($conf['useslash']){
$nssep = '[:;/]';
}else{
$nssep = '[:;]';
}
- return preg_replace('!.*'.$nssep.'!','',$name);
+ $name = preg_replace('!.*'.$nssep.'!','',$name);
+ //if there is a hash we use the ancor name only
+ $name = preg_replace('!.*#!','',$name);
+ return $name;
}
-
/**
* Renders internal and external media
*