Skip to content

Commit 2c8ece1

Browse files
Website, Issues: local_replace.py: More cases fixed.
1 parent 3627e6f commit 2c8ece1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

website/issues/extensions/local_replace.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
'<a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=\g<id>">debian#\g<id></a>' ),
55
(re.compile('\#(?P<ws>\s*)(?P<id>\d+)'),
66
"<a href='issue\g<id>'>#\g<ws>\g<id></a>" ),
7-
(re.compile('(?P<prews>^|\s+)(?P<revstr>(revision|rev|r)\s?)(?P<revision>[\da-fA-F]+)(?P<postws>\s+|$)'),
8-
"\g<prews><a href='http://sourceforge.net/p/roundup/code/ci/\g<revision>'>\g<revstr>\g<revision></a>"),
7+
(re.compile('(?P<prews>^|\s+)(?P<revstr>(revision|rev|r)\s?)(?P<revision>[\da-fA-F]+)(?P<post>\W+|$)'),
8+
"\g<prews><a href='http://sourceforge.net/p/roundup/code/ci/\g<revision>'>\g<revstr>\g<revision>\g<post></a>"),
99
]
1010

1111
def local_replace(message):
@@ -29,5 +29,6 @@ def init(instance):
2929
print " references", local_replace(" references") # should fail
3030
print " too many spaces r 222", local_replace(" too many spaces r 222") # should fail
3131
print " r7140eb", local_replace(" r7140eb")
32-
print " rev7140eb ", local_replace(" rev7140eb")
32+
print " rev7140eb ", local_replace(" rev7140eb ")
3333
print "rev7140eb", local_replace("rev7140eb")
34+
print "rev7140eb,", local_replace("rev7140eb,")

0 commit comments

Comments
 (0)