xref: /dokuwiki/inc/Parsing/ParserMode/Emphasis.php (revision 1f44347694a1b2d0182a0aaa0ca79ba9930f1d2a)
1*1f443476SAndreas Gohr<?php
2*1f443476SAndreas Gohr
3*1f443476SAndreas Gohrnamespace dokuwiki\Parsing\ParserMode;
4*1f443476SAndreas Gohr
5*1f443476SAndreas Gohrclass Emphasis extends AbstractFormatting
6*1f443476SAndreas Gohr{
7*1f443476SAndreas Gohr    /** @inheritdoc */
8*1f443476SAndreas Gohr    protected function getModeName(): string
9*1f443476SAndreas Gohr    {
10*1f443476SAndreas Gohr        return 'emphasis';
11*1f443476SAndreas Gohr    }
12*1f443476SAndreas Gohr
13*1f443476SAndreas Gohr    /**
14*1f443476SAndreas Gohr     * @inheritdoc
15*1f443476SAndreas Gohr     * @see https://github.com/dokuwiki/dokuwiki/issues/384
16*1f443476SAndreas Gohr     * @see https://github.com/dokuwiki/dokuwiki/issues/763
17*1f443476SAndreas Gohr     * @see https://github.com/dokuwiki/dokuwiki/issues/1468
18*1f443476SAndreas Gohr     */
19*1f443476SAndreas Gohr    protected function getEntryPattern(): string
20*1f443476SAndreas Gohr    {
21*1f443476SAndreas Gohr        return '//(?=[^\x00]*[^:])';
22*1f443476SAndreas Gohr    }
23*1f443476SAndreas Gohr
24*1f443476SAndreas Gohr    /** @inheritdoc */
25*1f443476SAndreas Gohr    protected function getExitPattern(): string
26*1f443476SAndreas Gohr    {
27*1f443476SAndreas Gohr        return '//';
28*1f443476SAndreas Gohr    }
29*1f443476SAndreas Gohr
30*1f443476SAndreas Gohr    /** @inheritdoc */
31*1f443476SAndreas Gohr    public function getSort()
32*1f443476SAndreas Gohr    {
33*1f443476SAndreas Gohr        return 80;
34*1f443476SAndreas Gohr    }
35*1f443476SAndreas Gohr}
36