1<?php 2 3/** 4 * Define various types of modes used by the parser - they are used to 5 * populate the list of modes another mode accepts 6 * 7 * @todo these should be moved to class constants or a generator method 8 */ 9global $PARSER_MODES; 10$PARSER_MODES = [ 11 // containers are complex modes that can contain many other modes 12 // hr breaks the principle but they shouldn't be used in tables / lists 13 // so they are put here 14 'container' => ['listblock', 'table', 'quote', 'hr'], 15 // some mode are allowed inside the base mode only 16 'baseonly' => ['header'], 17 // modes for styling text -- footnote behaves similar to styling 18 'formatting' => [ 19 'strong', 'emphasis', 'underline', 'monospace', 'subscript', 'superscript', 'deleted', 'footnote' 20 ], 21 // modes where the token is simply replaced - they can not contain any 22 // other modes 23 'substition' => [ 24 'acronym', 'smiley', 'wordblock', 'entity', 'camelcaselink', 'internallink', 'media', 'externallink', 25 'linebreak', 'emaillink', 'windowssharelink', 'filelink', 'notoc', 'nocache', 'multiplyentity', 'quotes', 'rss' 26 ], 27 // modes which have a start and end token but inside which 28 // no other modes should be applied 29 'protected' => ['preformatted', 'code', 'file'], 30 // inside this mode no wiki markup should be applied but lineendings 31 // and whitespace isn't preserved 32 'disabled' => ['unformatted'], 33 // used to mark paragraph boundaries 34 'paragraphs' => ['eol'], 35]; 36