r9395 - /scripts/qa/qareport-chlog.cgi

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Fri Nov 16 09:44:20 UTC 2007


Author: dmn
Date: Fri Nov 16 09:44:20 2007
New Revision: 9395

URL: http://svn.debian.org/wsvn/?sc=1&rev=9395
Log:
SVN version baloon (expanded): make bug IDs a link

Modified:
    scripts/qa/qareport-chlog.cgi

Modified: scripts/qa/qareport-chlog.cgi
URL: http://svn.debian.org/wsvn/scripts/qa/qareport-chlog.cgi?rev=9395&op=diff
==============================================================================
--- scripts/qa/qareport-chlog.cgi (original)
+++ scripts/qa/qareport-chlog.cgi Fri Nov 16 09:44:20 2007
@@ -47,6 +47,23 @@
 $text =~ s/>/>/g;
 $text =~ s{\r?\n}{<br/>}g;
 
+# replace bug-numbers with links
+$text =~ s{
+    (               # leading
+        ^               # start of string
+        |\s+            # or space
+        |[\[(]          # or bracket/paren
+    )
+    \#(\d+)         # followed by a bug ID
+    (               # trailing
+        [\]\-)\s]       # bracket/hyphen/paren/space
+        |$              # or text end
+    )
+}
+{$1<a href="http://bugs.debian.org/$2">#$2</a>$3}xgm;
+# treat text as multi-line
+
+
 print qq(<code style="white-space: pre">$text</code>);
 
 exit 0;




More information about the Pkg-perl-cvs-commits mailing list