Make the '@rev' part in the regex optional (fixes issue 730).

This commit is contained in:
Thomas Keller 2011-09-12 17:54:40 +02:00
parent a2c832a130
commit 1f0791df0e
2 changed files with 2 additions and 1 deletions

View File

@ -31,6 +31,7 @@ or newer to properly run this version of Indefero!
a new project or monotone key, in case an error popped up in the middle (issue 697) a new project or monotone key, in case an error popped up in the middle (issue 697)
- Indefero now sends the MD5 checksum as HTTP header when downloading a file from the - Indefero now sends the MD5 checksum as HTTP header when downloading a file from the
download area. Additionally, a unneeded redirect has been removed. (issue 716) download area. Additionally, a unneeded redirect has been removed. (issue 716)
- Source links without a specific revision did not work due to a wrong regex (issue 730)
- Better error detection and reporting in the SyncMonotone plugin - Better error detection and reporting in the SyncMonotone plugin
ATTENTION: This needs Pluf 46b7f251 or newer! ATTENTION: This needs Pluf 46b7f251 or newer!
- Fix the branch links users of the Subversion frontend get when they enter a wrong revision - Fix the branch links users of the Subversion frontend get when they enter a wrong revision

View File

@ -58,7 +58,7 @@ class IDF_Template_IssueComment extends Pluf_Template_Tag
implode('|', $nouns); implode('|', $nouns);
$text = IDF_Template_safePregReplace('#((?:'.$prefix.')(?:\s+r?))([0-9a-f]{1,40}((?:\s+and|\s+or|,)\s+r?[0-9a-f]{1,40})*)\b#i', $text = IDF_Template_safePregReplace('#((?:'.$prefix.')(?:\s+r?))([0-9a-f]{1,40}((?:\s+and|\s+or|,)\s+r?[0-9a-f]{1,40})*)\b#i',
array($this, 'callbackCommits'), $text); array($this, 'callbackCommits'), $text);
$text = IDF_Template_safePregReplace('=(src:)([^\s@#,\(\)\\\\]+(?:(\\\\)[\s@#][^\s@#,\(\)\\\\]+){0,})+(?:\@([^\s#,]+))(?:#(\d+))?=im', $text = IDF_Template_safePregReplace('=(src:)([^\s@#,\(\)\\\\]+(?:(\\\\)[\s@#][^\s@#,\(\)\\\\]+){0,})+(?:\@([^\s#,]+))?(?:#(\d+))?=im',
array($this, 'callbackSource'), $text); array($this, 'callbackSource'), $text);
} }
if ($wordwrap) $text = Pluf_Text::wrapHtml($text, 69, "\n"); if ($wordwrap) $text = Pluf_Text::wrapHtml($text, 69, "\n");