diff options
author | henning.noren <henning.noren@gmail.com> | 2007-01-04 20:49:53 +0100 |
---|---|---|
committer | henning.noren <henning.noren@gmail.com> | 2007-01-04 20:49:53 +0100 |
commit | d35ab615a0b98711390d39009e1a10a4edacfa9a (patch) | |
tree | 7e15c3eaf217827da0793877d6f8ece07c1e06eb /inc/parser | |
parent | 5b62573a1f36aba312b8d8155a3a37512d753423 (diff) | |
download | rpg-d35ab615a0b98711390d39009e1a10a4edacfa9a.tar.gz rpg-d35ab615a0b98711390d39009e1a10a4edacfa9a.tar.bz2 |
UNDO: regex_simpler.patch
Replaces some simple regular expressions with standard (faster) string functions
darcs-hash:20070104194953-d2a3e-8fd0c89812277467c5bce566dfc3fba6ce1c3981.gz
Diffstat (limited to 'inc/parser')
-rw-r--r-- | inc/parser/handler.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/inc/parser/handler.php b/inc/parser/handler.php index ae9d76912..a5d07a07a 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -585,9 +585,9 @@ class Doku_Handler { case DOKU_LEXER_MATCHED: if ( $match == ' ' ){ $this->_addCall('cdata', array($match), $pos); - } else if ( strpos('\t',$match) !== false ) { + } else if ( preg_match('/\t+/',$match) ) { $this->_addCall('table_align', array($match), $pos); - } else if ( strpos(' ',$match) !== false ) { + } else if ( preg_match('/ {2,}/',$match) ) { $this->_addCall('table_align', array($match), $pos); } else if ( $match == "\n|" ) { $this->_addCall('table_row', array(), $pos); @@ -659,9 +659,9 @@ function Doku_Handler_Parse_Media($match) { } //get linking command - if(stripos('nolink',$param) !== false){ + if(preg_match('/nolink/i',$param)){ $linking = 'nolink'; - }else if(stripos('direct',$param) !== false){ + }else if(preg_match('/direct/i',$param)){ $linking = 'direct'; }else{ $linking = 'details'; |