xref: /dokuwiki/inc/Parsing/ParserMode/Code.php (revision 589a4f073ab1e6b4304c2507274af28b7aea5dc9)
1<?php
2
3namespace dokuwiki\Parsing\ParserMode;
4
5class Code extends AbstractMode
6{
7    /** @inheritdoc */
8    public function connectTo($mode)
9    {
10        $this->Lexer->addEntryPattern('<code\b(?=.*</code>)', $mode, 'code');
11    }
12
13    /** @inheritdoc */
14    public function postConnect()
15    {
16        $this->Lexer->addExitPattern('</code>', 'code');
17    }
18
19    /** @inheritdoc */
20    public function getSort()
21    {
22        return 200;
23    }
24}
25