diff options
author | Michal Rezler <rezlemic@fel.cvut.cz> | 2011-03-23 10:39:45 +0100 |
---|---|---|
committer | Michal Rezler <rezlemic@fel.cvut.cz> | 2011-03-23 10:39:45 +0100 |
commit | 35838d22a57707952f630eaf9f9e9ab4c6c3cfb0 (patch) | |
tree | 3603e2e56314af40a4b7922e14e52c0bc06f6f9d /inc/parser/parser.php | |
parent | c4bb7947fcb2d4a5e5f8a15d9e3bbec333e44e13 (diff) | |
parent | ee1214abb2c14cf0f86ff6d9a5b49536c6b01e18 (diff) | |
download | rpg-35838d22a57707952f630eaf9f9e9ab4c6c3cfb0.tar.gz rpg-35838d22a57707952f630eaf9f9e9ab4c6c3cfb0.tar.bz2 |
jQuery rewrite branch merged into master branch of whole project
Diffstat (limited to 'inc/parser/parser.php')
-rw-r--r-- | inc/parser/parser.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/inc/parser/parser.php b/inc/parser/parser.php index 435b8aa46..e47ce56fa 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -90,7 +90,6 @@ class Doku_Parser { if ( $mode == 'base' ) { continue; } - $this->modes[$mode]->preConnect(); foreach ( array_keys($this->modes) as $cm ) { @@ -218,11 +217,11 @@ class Doku_Parser_Mode_footnote extends Doku_Parser_Mode { //------------------------------------------------------------------- class Doku_Parser_Mode_header extends Doku_Parser_Mode { - function preConnect() { + function connectTo($mode) { //we're not picky about the closing ones, two are enough $this->Lexer->addSpecialPattern( '[ \t]*={2,}[^\n]+={2,}[ \t]*(?=\n)', - 'base', + $mode, 'header' ); } @@ -298,6 +297,10 @@ class Doku_Parser_Mode_hr extends Doku_Parser_Mode { } //------------------------------------------------------------------- +/** + * This class sets the markup for bold (=strong), + * italic (=emphasis), underline etc. + */ class Doku_Parser_Mode_formatting extends Doku_Parser_Mode { var $type; @@ -825,7 +828,7 @@ class Doku_Parser_Mode_internallink extends Doku_Parser_Mode { function connectTo($mode) { // Word boundaries? - $this->Lexer->addSpecialPattern("\[\[.+?\]\]",$mode,'internallink'); + $this->Lexer->addSpecialPattern("\[\[(?:(?:[^[\]]*?\[.*?\])|.+?)\]\]",$mode,'internallink'); } function getSort() { @@ -867,7 +870,7 @@ class Doku_Parser_Mode_externallink extends Doku_Parser_Mode { if(count($this->patterns)) return; $ltrs = '\w'; - $gunk = '/\#~:.?+=&%@!\-'; + $gunk = '/\#~:.?+=&%@!\-\[\]'; $punc = '.:?\-;,'; $host = $ltrs.$punc; $any = $ltrs.$gunk.$punc; @@ -953,4 +956,4 @@ class Doku_Parser_Mode_emaillink extends Doku_Parser_Mode { } -//Setup VIM: ex: et ts=4 enc=utf-8 : +//Setup VIM: ex: et ts=4 : |