-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrenderer.php
48 lines (39 loc) · 986 Bytes
/
renderer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* DokuWiki Plugin LineBreak2; render component
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Satoshi Sahara <[email protected]>
*/
if(!defined('DOKU_INC')) die();
/**
* The Renderer
*/
class renderer_plugin_linebreak2 extends Doku_Renderer_xhtml {
function canRender($format) {
return ($format == 'xhtml');
}
function reset() {
$this->doc = '';
$this->footnotes = array();
$this->lastsec = 0;
$this->store = '';
$this->_counter = array();
}
/**
* Render plain text data
*
* @param string $text the text to display
*/
function cdata($text) {
static $renderer;
if (!isset($renderer)) {
$renderer = $this->loadHelper($this->getPluginName()) ?? false;
}
if ($renderer) {
$this->doc .= $renderer->cdata($text);
} else {
parent::cdata($text);
}
}
}