From bd1110793682d2b93f5f67e30ebfc4310605c829 Mon Sep 17 00:00:00 2001 From: andi Date: Fri, 29 Apr 2005 17:03:42 +0200 Subject: use anchor name on titles darcs-hash:20050429150342-9977f-78c6a2246791d9342462b770b303c19f5dff62cb.gz --- inc/parser/xhtml.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'inc/parser') 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 * -- cgit v1.2.3