[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

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

   1  <?php
   2  
   3  namespace dokuwiki\Parsing\ParserMode;
   4  
   5  class Unformatted extends AbstractMode
   6  {
   7      /** @inheritdoc */
   8      public function connectTo($mode)
   9      {
  10          $this->Lexer->addEntryPattern('<nowiki>(?=.*</nowiki>)', $mode, 'unformatted');
  11          $this->Lexer->addEntryPattern('%%(?=.*%%)', $mode, 'unformattedalt');
  12      }
  13  
  14      /** @inheritdoc */
  15      public function postConnect()
  16      {
  17          $this->Lexer->addExitPattern('</nowiki>', 'unformatted');
  18          $this->Lexer->addExitPattern('%%', 'unformattedalt');
  19          $this->Lexer->mapHandler('unformattedalt', 'unformatted');
  20      }
  21  
  22      /** @inheritdoc */
  23      public function getSort()
  24      {
  25          return 170;
  26      }
  27  }