1<?php
2/**
3 * DokuWiki Plugin latexcaption (Subtype Syntax Component)
4 *
5 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
6 * @author  Ben van Magill <ben.vanmagill16@gmail.com>
7 */
8
9
10class syntax_plugin_latexcaption_subtype extends syntax_plugin_latexcaption_caption
11{
12    // Defined separately to ensure that eg <figure> does not exit with </subfigure>;
13    public function connectTo($mode) {
14        $this->Lexer->addEntryPattern('<subfigure.*?>(?=.*</subfigure>)',$mode, 'plugin_latexcaption_caption');
15        $this->Lexer->addEntryPattern('<subtable.*?>(?=.*</subtable>)',$mode, 'plugin_latexcaption_caption');
16    }
17
18    public function postConnect() {
19        $this->Lexer->addExitPattern('</subfigure>','plugin_latexcaption_caption');
20        $this->Lexer->addExitPattern('</subtable>','plugin_latexcaption_caption');
21    }
22}
23
24// vim:ts=4:sw=4:et:
25