リビジョン | b342c1e787bf0d86aea9c24b5f2aebdb5692498a (tree) |
---|---|
日時 | 2015-03-25 02:35:54 |
作者 | umorigu <umorigu@gmai...> |
コミッター | 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 | } |