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