Skip to content

Commit c849578

Browse files
Website, Issues: local_replace.py added "issue" pattern.
1 parent 00ca42b commit c849578

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

website/issues/extensions/local_replace.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +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+)issue(?P<ws>\s*)(?P<id>\d+)'),
8+
"\g<prews><a href='issue\g<id>'>issue\g<ws>\g<id></a>" ),
79
(re.compile('(?P<prews>^|\s+)(?P<revstr>(revision|rev|r)\s?)(?P<revision>[\da-fA-F]+)(?P<post>\W+|$)'),
810
"\g<prews><a href='http://sourceforge.net/p/roundup/code/ci/\g<revision>'>\g<revstr>\g<revision></a>\g<post>"),
911
]
@@ -23,6 +25,7 @@ def init(instance):
2325
if "__main__" == __name__:
2426
print " debian:#222", local_replace(" debian:#222")
2527
print " #555", local_replace(" #555")
28+
print "issue333", local_replace("issue333")
2629
print " revision 222", local_replace(" revision 222")
2730
print " r 222", local_replace(" r 222")
2831
print " wordthatendswithr 222", local_replace(" wordthatendswithr 222") # should fail

0 commit comments

Comments
 (0)