xref: /dokuwiki/inc/Parsing/ParserMode/Subscript.php (revision c3755410ab98ca2a05ee21de7b0df40f38c6a879)
1<?php
2
3namespace dokuwiki\Parsing\ParserMode;
4
5class Subscript extends AbstractFormatting
6{
7    /** @inheritdoc */
8    public function getSort()
9    {
10        return 110;
11    }
12
13    /** @inheritdoc */
14    protected function getModeName(): string
15    {
16        return 'subscript';
17    }
18
19    /** @inheritdoc */
20    protected function getEntryPattern(): string
21    {
22        return '<sub>(?=[^\s])(?=' . self::CONTENT_UNTIL_PARA . '[^\s]</sub>)';
23    }
24
25    /** @inheritdoc */
26    protected function getExitPattern(): string
27    {
28        return '(?<=[^\s])</sub>';
29    }
30}
31