• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

PukiWiki


Commit MetaInfo

修訂4752aff02f23103dde268ec5de6e1426218ae70f (tree)
時間2015-03-25 02:15:59
作者umorigu <umorigu@gmai...>
Commiterumorigu

Log Message

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 '(?='.

Change Summary

差異

--- a/lib/make_link.php
+++ b/lib/make_link.php
@@ -287,7 +287,7 @@ class Link_note extends Link
287287 {
288288 return <<<EOD
289289 \(\(
290- ((?:(?R)|(?!\)\)).)*) # (1) note body
290+ ((?>(?=\(\()(?R)|(?!\)\)).)*) # (1) note body
291291 \)\)
292292 EOD;
293293 }