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