xref: /dokuwiki/inc/Parsing/ParserMode/Header.php (revision a7b2005af9c5943ba9bb7b178697e7b36de9200f)
1<?php
2
3namespace dokuwiki\Parsing\ParserMode;
4
5class Header extends AbstractMode
6{
7
8    /** @inheritdoc */
9    public function connectTo($mode)
10    {
11        //we're not picky about the closing ones, two are enough
12        $this->Lexer->addSpecialPattern(
13            '[ \t]*={2,}[^\n]+={2,}[ \t]*(?=\n)',
14            $mode,
15            'header'
16        );
17    }
18
19    /** @inheritdoc */
20    public function getSort()
21    {
22        return 50;
23    }
24}
25