diff options
author | Anika Henke <anika@selfthinker.org> | 2014-01-05 16:25:21 +0000 |
---|---|---|
committer | Anika Henke <anika@selfthinker.org> | 2014-01-05 16:25:21 +0000 |
commit | 8491e52805a9aaef90168f1417c6e0806fb7c5d7 (patch) | |
tree | 536ad50878f0ac6f6815db91f8bcb4819bc092ae /inc/parser/parser.php | |
parent | 6fdd11e032b654dd27de346f7e54231ee043d7ef (diff) | |
parent | dfaf5f6c54597f81b1a8b777f55b89c93f87a345 (diff) | |
download | rpg-8491e52805a9aaef90168f1417c6e0806fb7c5d7.tar.gz rpg-8491e52805a9aaef90168f1417c6e0806fb7c5d7.tar.bz2 |
Merge remote-tracking branch 'origin/master' into extension_manager
Diffstat (limited to 'inc/parser/parser.php')
-rw-r--r-- | inc/parser/parser.php | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/inc/parser/parser.php b/inc/parser/parser.php index 4af1cd333..1f14b98a3 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -45,9 +45,9 @@ $PARSER_MODES = array( //------------------------------------------------------------------- /** -* Sets up the Lexer with modes and points it to the Handler -* For an intro to the Lexer see: wiki:parser -*/ + * Sets up the Lexer with modes and points it to the Handler + * For an intro to the Lexer see: wiki:parser + */ class Doku_Parser { var $Handler; @@ -70,9 +70,9 @@ class Doku_Parser { } /** - * PHP preserves order of associative elements - * Mode sequence is important - */ + * PHP preserves order of associative elements + * Mode sequence is important + */ function addMode($name, & $Mode) { if ( !isset($this->modes['base']) ) { $this->addBaseMode(new Doku_Parser_Mode_base()); @@ -134,7 +134,7 @@ class Doku_Parser { * all modes are registered * * @author Harry Fuecks <hfuecks@gmail.com> -*/ + */ class Doku_Parser_Mode { /** @@ -454,8 +454,8 @@ class Doku_Parser_Mode_table extends Doku_Parser_Mode { } function connectTo($mode) { - $this->Lexer->addEntryPattern('\s*\n\^',$mode,'table'); - $this->Lexer->addEntryPattern('\s*\n\|',$mode,'table'); + $this->Lexer->addEntryPattern('[\t ]*\n\^',$mode,'table'); + $this->Lexer->addEntryPattern('[\t ]*\n\|',$mode,'table'); } function postConnect() { @@ -621,7 +621,7 @@ class Doku_Parser_Mode_acronym extends Doku_Parser_Mode { var $pattern = ''; function Doku_Parser_Mode_acronym($acronyms) { - usort($acronyms,array($this,'_compare')); + usort($acronyms,array($this,'_compare')); $this->acronyms = $acronyms; } @@ -652,12 +652,12 @@ class Doku_Parser_Mode_acronym extends Doku_Parser_Mode { $a_len = strlen($a); $b_len = strlen($b); if ($a_len > $b_len) { - return -1; + return -1; } else if ($a_len < $b_len) { - return 1; + return 1; } - return 0; + return 0; } } @@ -807,7 +807,6 @@ class Doku_Parser_Mode_quotes extends Doku_Parser_Mode { "\"",$mode,'doublequoteclosing' ); - } function getSort() { |