Eol.php 574 B

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