1<?php
2/**
3 * Render Plugin for XHTML output with preserved linebreaks
4 *
5 * @author Chris Smith <chris@jalakai.co.uk>
6 */
7
8if(!defined('DOKU_INC')) die();
9if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
10
11require_once DOKU_INC . 'inc/parser/xhtml.php';
12
13/**
14 * The Renderer
15 */
16class renderer_plugin_xbr extends Doku_Renderer_xhtml {
17
18    function canRender($format) {
19      return ($format=='xhtml');
20    }
21
22    function reset() {
23       $this->doc = '';
24       $this->footnotes = array();
25       $this->lastsec = 0;
26       $this->store = '';
27       $this->_counter = array();
28    }
29
30    function cdata($text) {
31        $this->doc .= str_replace("\n","<br />\n",$this->_xmlEntities($text));
32    }
33
34}
35
36//Setup VIM: ex: et ts=4 enc=utf-8 :
37