summaryrefslogtreecommitdiff
path: root/inc/html.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/html.php')
-rw-r--r--inc/html.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/inc/html.php b/inc/html.php
index 3ae192c73..35cb09d3a 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -1273,7 +1273,13 @@ function html_TOC($toc){
* Callback for html_buildlist
*/
function html_list_toc($item){
- return '<span class="li"><a href="'.$item['link'].'" class="toc">'.
+ if($item['hid']){
+ $link = '#'.$item['hid'];
+ }else{
+ $link = $item['link'];
+ }
+
+ return '<span class="li"><a href="'.$link.'" class="toc">'.
hsc($item['title']).'</a></span>';
}