diff options
Diffstat (limited to 'platform/www/inc/Parsing/ParserMode/Html.php')
-rw-r--r-- | platform/www/inc/Parsing/ParserMode/Html.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/platform/www/inc/Parsing/ParserMode/Html.php b/platform/www/inc/Parsing/ParserMode/Html.php new file mode 100644 index 0000000..f5b63ef --- /dev/null +++ b/platform/www/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; + } +} |