1<?php
2/**
3* Plugin HighlightJs: Plugin providing highlight.js version 5.71.
4*
5* @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
6* @author     Clément Chartier <clement@studiorvb.com>
7*/
8
9if(!defined('DOKU_INC')) die();
10if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
11
12require_once DOKU_INC . 'inc/parser/xhtml.php';
13
14class renderer_plugin_highlightjs extends Doku_Renderer_xhtml {
15
16    function getInfo(){
17        return confToHash(dirname(__FILE__).'/INFO.txt');
18    }
19
20    function canRender($format) {
21      return ($format=='xhtml');
22    }
23    function reset() {
24       $this->doc = '';
25       $this->footnotes = array();
26       $this->lastsec = 0;
27       $this->store = '';
28       $this->_counter = array();
29    }
30
31    function preformatted($text) {
32        $this->doc .= '<pre><code>' . $this->_xmlEntities($text) . '</code></pre>'. DOKU_LF;
33    }
34
35}
36?>