diff options
Diffstat (limited to 'inc/ParserMode/Header.php')
-rw-r--r-- | inc/ParserMode/Header.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/inc/ParserMode/Header.php b/inc/ParserMode/Header.php new file mode 100644 index 000000000..2da3242cf --- /dev/null +++ b/inc/ParserMode/Header.php @@ -0,0 +1,24 @@ +<?php + +namespace dokuwiki\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; + } +} |