diff options
Diffstat (limited to 'inc/Parsing/ParserMode/File.php')
-rw-r--r-- | inc/Parsing/ParserMode/File.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/inc/Parsing/ParserMode/File.php b/inc/Parsing/ParserMode/File.php new file mode 100644 index 000000000..149134135 --- /dev/null +++ b/inc/Parsing/ParserMode/File.php @@ -0,0 +1,25 @@ +<?php + +namespace dokuwiki\Parsing\ParserMode; + +class File extends AbstractMode +{ + + /** @inheritdoc */ + public function connectTo($mode) + { + $this->Lexer->addEntryPattern('<file\b(?=.*</file>)', $mode, 'file'); + } + + /** @inheritdoc */ + public function postConnect() + { + $this->Lexer->addExitPattern('</file>', 'file'); + } + + /** @inheritdoc */ + public function getSort() + { + return 210; + } +} |