[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/Parsing/ParserMode/ -> Eol.php (source)

   1  <?php
   2  
   3  namespace dokuwiki\Parsing\ParserMode;
   4  
   5  class Eol extends AbstractMode
   6  {
   7      /** @inheritdoc */
   8      public function connectTo($mode)
   9      {
  10          $badModes = ['listblock', 'table'];
  11          if (in_array($mode, $badModes)) {
  12              return;
  13          }
  14          // see FS#1652, pattern extended to swallow preceding whitespace to avoid
  15          // issues with lines that only contain whitespace
  16          $this->Lexer->addSpecialPattern('(?:^[ \t]*)?\n', $mode, 'eol');
  17      }
  18  
  19      /** @inheritdoc */
  20      public function getSort()
  21      {
  22          return 370;
  23      }
  24  }