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]+)' ),
7+ (re .compile ('(?P<prews>^| \s+)(?P<revstr>(revision|rev|r)\s?)(?P<revision>[\da-fA-F]+)(?P<postws>\s+|$ )' ),
88 "\g<prews><a href='http://sourceforge.net/p/roundup/code/ci/\g<revision>'>\g<revstr>\g<revision></a>" ),
99 ]
1010
@@ -26,7 +26,8 @@ def init(instance):
2626 print " revision 222" , local_replace (" revision 222" )
2727 print " r 222" , local_replace (" r 222" )
2828 print " wordthatendswithr 222" , local_replace (" wordthatendswithr 222" ) # should fail
29+ print " references" , local_replace (" references" ) # should fail
2930 print " too many spaces r 222" , local_replace (" too many spaces r 222" ) # should fail
3031 print " r7140eb" , local_replace (" r7140eb" )
31- print " rev7140eb" , local_replace (" rev7140eb" )
32- print " rev7140eb" , local_replace (" rev7140eb" )
32+ print " rev7140eb " , local_replace (" rev7140eb" )
33+ print "rev7140eb" , local_replace ("rev7140eb" )
0 commit comments