1<?php
2/**
3 * DokuWiki Plugin structodt (Syntax Component)
4 *
5 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
6 * @author  Szymon Olewniczak <it@rid.pl>
7 */
8
9// must be run within Dokuwiki
10use dokuwiki\plugin\structodt\meta\AggregationTableOdt;
11
12if (!defined('DOKU_INC')) die();
13
14class syntax_plugin_structodt_table extends syntax_plugin_struct_table {
15
16    /** @var string which class to use for output */
17    protected $tableclass = AggregationTableOdt::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 odt *-+\n.*?\n----+', $mode, 'plugin_structodt_table');
26        $this->Lexer->addSpecialPattern('----+ *struct odt table *-+\n.*?\n----+', $mode, 'plugin_structodt_table');
27    }
28}
29
30// vim:ts=4:sw=4:et: