1<?php
2/**
3 * XHTML renderer which produces lists without div\'s in.
4 *
5 * @author Martyn Eggleton for Access Space <martyn@access-space.org>
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_plainlists extends Doku_Renderer_xhtml {
17
18    function getInfo(){
19      return array(
20        'author' => 'Martyn Eggleton',
21        'email'  => 'martyn.eggleton@gmail.com',
22        'date'   => '2008-11-20',
23        'name'   => 'Plain List Renderer',
24        'desc'   => 'XHTML renderer which produces lists without div\'s in.',
25        'url'    => 'http://www.dokuwiki.org/plugin:plainlists',
26      );
27    }
28
29    function canRender($format) {
30      return ($format=='xhtml');
31    }
32
33    function listcontent_open() {
34
35    }
36
37    function listcontent_close() {
38       $this->doc .= DOKU_LF;
39    }
40
41    function reset() {
42       $this->doc = '';
43       $this->footnotes = array();
44       $this->lastsec = 0;
45       $this->store = '';
46       $this->_counter = array();
47    }
48
49    function internallink($id, $name = NULL, $search=NULL,$returnonly=false,$linktype='content') {
50      $text = parent::internallink($id, $name, $search, true, $linktype);
51      $text = preg_replace('/ class="[^"]+"/', '', $text);
52      $this->doc .= $text;
53    }
54
55}
56
57