10cecf9d5Sandi<?php 236dc94bbSAndreas Gohr 3ee20e7d1Sandi/** 4ee20e7d1Sandi * Define various types of modes used by the parser - they are used to 5ee20e7d1Sandi * populate the list of modes another mode accepts 6ee20e7d1Sandi */ 7ee20e7d1Sandiglobal $PARSER_MODES; 8ee20e7d1Sandi$PARSER_MODES = array( 9ee20e7d1Sandi // containers are complex modes that can contain many other modes 10ee20e7d1Sandi // hr breaks the principle but they shouldn't be used in tables / lists 11ee20e7d1Sandi // so they are put here 12ee20e7d1Sandi 'container' => array('listblock', 'table', 'quote', 'hr'), 13ee20e7d1Sandi 14ee20e7d1Sandi // some mode are allowed inside the base mode only 15ee20e7d1Sandi 'baseonly' => array('header'), 16ee20e7d1Sandi 17ee20e7d1Sandi // modes for styling text -- footnote behaves similar to styling 18*d4d8fb18SAndreas Gohr 'formatting' => array( 19*d4d8fb18SAndreas Gohr 'strong', 'emphasis', 'underline', 'monospace', 20*d4d8fb18SAndreas Gohr 'subscript', 'superscript', 'deleted', 'footnote' 21*d4d8fb18SAndreas Gohr ), 22ee20e7d1Sandi 23ee20e7d1Sandi // modes where the token is simply replaced - they can not contain any 24ee20e7d1Sandi // other modes 25*d4d8fb18SAndreas Gohr 'substition' => array( 26*d4d8fb18SAndreas Gohr 'acronym', 'smiley', 'wordblock', 'entity', 27ee20e7d1Sandi 'camelcaselink', 'internallink', 'media', 28ee20e7d1Sandi 'externallink', 'linebreak', 'emaillink', 29ee20e7d1Sandi 'windowssharelink', 'filelink', 'notoc', 30*d4d8fb18SAndreas Gohr 'nocache', 'multiplyentity', 'quotes', 'rss' 31*d4d8fb18SAndreas Gohr ), 32ee20e7d1Sandi 33ee20e7d1Sandi // modes which have a start and end token but inside which 34ee20e7d1Sandi // no other modes should be applied 3507f89c3cSAnika Henke 'protected' => array('preformatted', 'code', 'file', 'php', 'html', 'htmlblock', 'phpblock'), 36ee20e7d1Sandi 37ee20e7d1Sandi // inside this mode no wiki markup should be applied but lineendings 38ee20e7d1Sandi // and whitespace isn't preserved 39ee20e7d1Sandi 'disabled' => array('unformatted'), 40ee20e7d1Sandi 41ee20e7d1Sandi // used to mark paragraph boundaries 42ee20e7d1Sandi 'paragraphs' => array('eol') 43ee20e7d1Sandi); 44ee20e7d1Sandi 450cecf9d5Sandi/** 46*d4d8fb18SAndreas Gohr * Class Doku_Parser 4747f73ecfSAndreas Gohr * 48*d4d8fb18SAndreas Gohr * @deprecated 2018-05-04 49e3ab6fc5SMichael Hamann */ 50*d4d8fb18SAndreas Gohrclass Doku_Parser extends \dokuwiki\Parsing\Parser { 51*d4d8fb18SAndreas Gohr 52*d4d8fb18SAndreas Gohr /** @inheritdoc */ 5347f73ecfSAndreas Gohr public function __construct(Doku_Handler $handler) { 54*d4d8fb18SAndreas Gohr dbg_deprecated(\dokuwiki\Parsing\Parser::class); 55*d4d8fb18SAndreas Gohr parent::__construct($handler); 5647f73ecfSAndreas Gohr } 570cecf9d5Sandi} 58