Skip to content

Commit

Permalink
Request #12569 Adding 'base_url' to XHTML Toc renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
CloCkWeRX authored and yunosh committed Sep 1, 2017
1 parent a630e55 commit aa6de81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Text/Wiki/Render/Xhtml/Toc.php
Expand Up @@ -30,6 +30,7 @@ class Text_Wiki_Render_Xhtml_Toc extends Text_Wiki_Render {
'css_item' => null,
'title' => '<strong>Table of Contents</strong>',
'div_id' => 'toc',
'base_url' => '',
'collapse' => true
);

Expand Down Expand Up @@ -102,7 +103,7 @@ function token($options)
$pad = ($level - $this->min);
$html .= " style=\"margin-left: {$pad}em;\">";

$html .= "<a href=\"#$id\">";
$html .= '<a href="' . $this->getConf('base_url') . '#' . $id . '">';
return $html;
break;

Expand Down

0 comments on commit aa6de81

Please sign in to comment.