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