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