File: closesection.php

package info (click to toggle)
dokuwiki-plugins-extra 20241201-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,108 kB
  • sloc: php: 2,543; javascript: 115; makefile: 112; sh: 76
file content (35 lines) | stat: -rw-r--r-- 877 bytes parent folder | download | duplicates (2)
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
<?php
/**
 * Section close helper of the Wrap Plugin
 *
 * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
 * @author     Michael Hamann <michael@content-space.de>
 */

class syntax_plugin_wrap_closesection extends DokuWiki_Syntax_Plugin {

    function getType(){ return 'substition';}
    function getPType(){ return 'block';}
    function getSort(){ return 195; }

    /**
     * Dummy handler, this syntax part has no syntax but is directly added to the instructions by the div syntax
     */
    function handle($match, $state, $pos, Doku_Handler $handler){
    }

    /**
     * Create output
     */
    function render($format, Doku_Renderer $renderer, $data) {
        if($format == 'xhtml'){
            /** @var Doku_Renderer_xhtml $renderer */
            $renderer->finishSectionEdit();
            return true;
        }
        return false;
    }


}