Skip to content
Snippets Groups Projects
Commit e3a24861 authored by Christopher Smith's avatar Christopher Smith
Browse files

Update inbuilt renderers for node/leaf state in listitem_open

- includes, xhtml renderer adding 'node' class to <li> when it contains
  child list(s)
parent 10bcc8aa
No related branches found
No related tags found
No related merge requests found
......@@ -251,8 +251,9 @@ class Doku_Renderer_metadata extends Doku_Renderer {
* Open a list item
*
* @param int $level the nesting level
* @param bool $node true when a node; false when a leaf
*/
function listitem_open($level) {
function listitem_open($level,$node=false) {
$this->cdata(str_repeat(DOKU_TAB, $level).'* ');
}
......
......@@ -343,8 +343,9 @@ class Doku_Renderer extends DokuWiki_Plugin {
* Open a list item
*
* @param int $level the nesting level
* @param bool $node true when a node; false when a leaf
*/
function listitem_open($level) {
function listitem_open($level,$node=false) {
}
/**
......
......@@ -456,9 +456,11 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
* Open a list item
*
* @param int $level the nesting level
* @param bool $node true when a node; false when a leaf
*/
function listitem_open($level) {
$this->doc .= '<li class="level'.$level.'">';
function listitem_open($level, $node=false) {
$branching = $node ? ' node' : '';
$this->doc .= '<li class="level'.$level.$branching.'">';
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment