Source for file Toc.php
Documentation is available at Toc.php
class Text_Wiki_Render_Xhtml_Toc extends Text_Wiki_Render {
* Renders a token into text matching the requested format.
* @param array $options The "options" portion of the token (second
* @return string The text rendered from the token options.
// the prefix used for anchor names
// ... generate an anchor.
return " <a id=\"$prefix$count\"></a>";
if ($type == 'list_start') {
if ($type == 'list_end') {
if ($type == 'item_start') {
// build some indenting spaces for the text
$indent = ($level - 2 ) * 4;
// add an extra linebreak in front of heading-2
// entries (makes for nice section separations)
if ($level <= 2 && $count > 0 ) {
// create the entry line as a link to the toc anchor
return " $pad<a href=\"#$prefix$count\">";
if ($type == 'item_end') {
Documentation generated on Mon, 11 Mar 2019 13:51:29 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|