Header.php 450 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace dokuwiki\Parsing\ParserMode;
  3. class Header extends AbstractMode
  4. {
  5. /** @inheritdoc */
  6. public function connectTo($mode)
  7. {
  8. //we're not picky about the closing ones, two are enough
  9. $this->Lexer->addSpecialPattern(
  10. '[ \t]*={2,}[^\n]+={2,}[ \t]*(?=\n)',
  11. $mode,
  12. 'header'
  13. );
  14. }
  15. /** @inheritdoc */
  16. public function getSort()
  17. {
  18. return 50;
  19. }
  20. }