'neolao', 'email' => 'neo@neolao.com', 'date' => '2010-01-09', 'name' => 'HTML5', 'desc' => 'Plugin to add HTML5 Renderer.', 'url' => '', ); } /** * Get the format name * * @return The format name */ function getFormat() { return 'html5'; } /** * Indicate that the plugin can render the specified format * * @param string $format The format * @return bool true if the plugin can render the format, false otherwise */ function canRender( $format ) { return ( $format == 'xhtml' ); } /** * */ function document_end() { // Close section if( $this->lastlevel > 1 ) { $this->doc .= str_repeat( DOKU_LF.'' , $this->lastlevel -1 ); } parent::document_end(); } /** * Print a header * * @param string $text The header content * @param int $level The header level * @param ??? $pos ??? */ function header( $text, $level, $pos ) { if( !$text ) return; //skip empty headlines $hid = $this->_headerToLink( $text, true ); // Only add items within configured levels $this->toc_additem( $hid, $text, $level ); // Adjust $node to reflect hierarchy of levels $this->node[$level-1]++; if ($level < $this->lastlevel) { for ($i = 0; $i < $this->lastlevel-$level; $i++) { $this->node[$this->lastlevel-$i-1] = 0; } } $lastLevel = $this->lastlevel; $this->lastlevel = $level; // Close section if( $lastLevel >= $level ) { $this->doc .= str_repeat( DOKU_LF.'' , $lastLevel - $level + 1 ); } // Open section if( $level > 1 ) { $this->doc .= DOKU_LF.'
'; } // Write the header $this->doc .= DOKU_LF.'

'; $this->doc .= $this->_xmlEntities( $text ); $this->doc .= '

'.DOKU_LF; } /** * Section edit marker is replaced by an edit button when * the page is editable. Replacement done in 'inc/html.php#html_secedit' */ function section_edit( $start, $end, $level, $name ) { } /** * Open a section * * @param int $level The section level */ function section_open( $level ) { } /** * Close a section */ function section_close() { } /** *Open list content */ function listcontent_open() { } /** * Close list content */ function listcontent_close() { } /** * Add a smiley */ function smiley($smiley) { if ( array_key_exists($smiley, $this->smileys) ) { $title = $this->_xmlEntities($this->smileys[$smiley]); $this->doc .= ''.
                    $this->_xmlEntities($smiley).''; } else { $this->doc .= $this->_xmlEntities($smiley); } } }