Skip to content

Commit

Permalink
Use a standard header for the header with link in non-xhtml mode
Browse files Browse the repository at this point in the history
This fixes the header with link ("showlink" feature) for export plugins
(without link though).
  • Loading branch information
michitux committed Nov 23, 2012
1 parent 094e7eb commit 8d636b3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions syntax/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ function render($mode, &$renderer, $data) {
global $conf;

list($headline, $lvl, $pos, $page, $sect, $flags) = $data;
$hid = $renderer->_headerToLink($headline, true);

if ($mode == 'xhtml') {
/** @var Doku_Renderer_xhtml $renderer */
$hid = $renderer->_headerToLink($headline, true);
$renderer->toc_additem($hid, $headline, $lvl);
$url = ($sect) ? wl($page) . '#' . $sect : wl($page);
$renderer->doc .= DOKU_LF.'<h' . $lvl;
Expand All @@ -64,9 +66,8 @@ function render($mode, &$renderer, $data) {
$renderer->doc .= $headline;
$renderer->doc .= '</a></h' . $lvl . '>' . DOKU_LF;
return true;
} elseif($mode == 'metadata') {
$renderer->toc_additem($hid, $headline, $lvl);
return true;
} else {
$renderer->header($headline, $lvl, $pos);
}
return false;
}
Expand Down

0 comments on commit 8d636b3

Please sign in to comment.