1<?php
2
3namespace dokuwiki\Parsing\ParserMode;
4
5class Unformatted extends AbstractMode
6{
7    /** @inheritdoc */
8    public function connectTo($mode)
9    {
10        $this->Lexer->addEntryPattern('<nowiki>(?=.*</nowiki>)', $mode, 'unformatted');
11        $this->Lexer->addEntryPattern('%%(?=.*%%)', $mode, 'unformattedalt');
12    }
13
14    /** @inheritdoc */
15    public function postConnect()
16    {
17        $this->Lexer->addExitPattern('</nowiki>', 'unformatted');
18        $this->Lexer->addExitPattern('%%', 'unformattedalt');
19        $this->Lexer->mapHandler('unformattedalt', 'unformatted');
20    }
21
22    /** @inheritdoc */
23    public function getSort()
24    {
25        return 170;
26    }
27}
28