Subversion Repositories Applications.papyrus

Rev

Rev 1688 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
248 jpm 1
<?php
2
 
3
class Text_Wiki_Render_Xhtml_Heading extends Text_Wiki_Render {
4
 
5
    var $conf = array(
6
        'css_h1' => null,
7
        'css_h2' => null,
8
        'css_h3' => null,
9
        'css_h4' => null,
10
        'css_h5' => null,
11
        'css_h6' => null
12
    );
13
 
14
    function token($options)
15
    {
16
        // get nice variable names (id, type, level)
17
        extract($options);
18
 
19
        if ($type == 'start') {
20
            $css = $this->formatConf(' class="%s"', "css_h$level");
21
            return "<h$level$css id=\"$id\">";
22
        }
23
 
24
        if ($type == 'end') {
25
            return "</h$level>\n";
26
        }
27
    }
28
}
29
?>