Subversion Repositories Applications.papyrus

Rev

Rev 1372 | 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_Plain_Deflist extends Text_Wiki_Render {
4
 
5
    /**
6
    *
7
    * Renders a token into text matching the requested format.
8
    *
9
    * @access public
10
    *
11
    * @param array $options The "options" portion of the token (second
12
    * element).
13
    *
14
    * @return string The text rendered from the token options.
15
    *
16
    */
17
 
18
    function token($options)
19
    {
20
        $type = $options['type'];
21
        $pad = "    ";
22
 
23
        switch ($type) {
24
 
25
        case 'list_start':
26
            return "\n";
27
            break;
28
 
29
        case 'list_end':
30
            return "\n\n";
31
            break;
32
 
33
        case 'term_start':
34
 
35
            // done!
36
            return $pad;
37
            break;
38
 
39
        case 'term_end':
40
            return "\n";
41
            break;
42
 
43
        case 'narr_start':
44
 
45
            // done!
46
            return $pad . $pad;
47
            break;
48
 
49
        case 'narr_end':
50
            return "\n";
51
            break;
52
 
53
        default:
54
            return '';
55
 
56
        }
57
    }
58
}
59
?>