aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/Parsing/ParserMode/Header.php
blob: 8dc8937ec2cc1861a7dfb1b1a3412e559ef56e94 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

namespace dokuwiki\Parsing\ParserMode;

class Header extends AbstractMode
{
    /** @inheritdoc */
    public function connectTo($mode)
    {
        //we're not picky about the closing ones, two are enough
        $this->Lexer->addSpecialPattern(
            '[ \t]*={2,}[^\n]+={2,}[ \t]*(?=\n)',
            $mode,
            'header'
        );
    }

    /** @inheritdoc */
    public function getSort()
    {
        return 50;
    }
}