summaryrefslogtreecommitdiff
path: root/platform/www/inc/Parsing/ParserMode/Eol.php
diff options
context:
space:
mode:
Diffstat (limited to 'platform/www/inc/Parsing/ParserMode/Eol.php')
-rw-r--r--platform/www/inc/Parsing/ParserMode/Eol.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/platform/www/inc/Parsing/ParserMode/Eol.php b/platform/www/inc/Parsing/ParserMode/Eol.php
new file mode 100644
index 0000000..a5886b5
--- /dev/null
+++ b/platform/www/inc/Parsing/ParserMode/Eol.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace dokuwiki\Parsing\ParserMode;
+
+class Eol extends AbstractMode
+{
+
+ /** @inheritdoc */
+ public function connectTo($mode)
+ {
+ $badModes = array('listblock','table');
+ if (in_array($mode, $badModes)) {
+ return;
+ }
+ // see FS#1652, pattern extended to swallow preceding whitespace to avoid
+ // issues with lines that only contain whitespace
+ $this->Lexer->addSpecialPattern('(?:^[ \t]*)?\n', $mode, 'eol');
+ }
+
+ /** @inheritdoc */
+ public function getSort()
+ {
+ return 370;
+ }
+}