1<?php
2/**
3 * DokuWiki Plugin structgantt (Syntax Component)
4 *
5 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
6 * @author  Andreas Gohr <gohr@cosmocode.de>
7 */
8
9// must be run within Dokuwiki
10use dokuwiki\plugin\structgantt\meta\Gantt;
11
12if (!defined('DOKU_INC')) die();
13
14class syntax_plugin_structgantt extends syntax_plugin_struct_table {
15
16    /** @var string which class to use for output */
17    protected $tableclass = Gantt::class;
18
19    /**
20     * Connect lookup pattern to lexer.
21     *
22     * @param string $mode Parser mode
23     */
24    public function connectTo($mode) {
25        $this->Lexer->addSpecialPattern('----+ *struct gantt *-+\n.*?\n----+', $mode, 'plugin_structgantt');
26    }
27
28}
29
30// vim:ts=4:sw=4:et:
31