PukiWiki
修訂 | 4752aff02f23103dde268ec5de6e1426218ae70f (tree) |
---|---|
時間 | 2015-03-25 02:15:59 |
作者 | ![]() |
Commiter | umorigu |
BugTrack2/358 Improve note regex for better PHP compatibility
PHP5.3 (and others) sometimes crash with long note body.
So we reduce regex computational complexity by using '(('
Positive assertion and Once-only subpattern '(?='.
@@ -287,7 +287,7 @@ class Link_note extends Link | ||
287 | 287 | { |
288 | 288 | return <<<EOD |
289 | 289 | \(\( |
290 | - ((?:(?R)|(?!\)\)).)*) # (1) note body | |
290 | + ((?>(?=\(\()(?R)|(?!\)\)).)*) # (1) note body | |
291 | 291 | \)\) |
292 | 292 | EOD; |
293 | 293 | } |