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