Code.php 447 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace dokuwiki\Parsing\ParserMode;
  3. class Code extends AbstractMode
  4. {
  5. /** @inheritdoc */
  6. public function connectTo($mode)
  7. {
  8. $this->Lexer->addEntryPattern('<code\b(?=.*</code>)', $mode, 'code');
  9. }
  10. /** @inheritdoc */
  11. public function postConnect()
  12. {
  13. $this->Lexer->addExitPattern('</code>', 'code');
  14. }
  15. /** @inheritdoc */
  16. public function getSort()
  17. {
  18. return 200;
  19. }
  20. }