On 06/06/2011 07:27 PM, [email protected] wrote: > On Sat, Jun 04, 2011 at 11:21:00AM +0200, Ferry Huberts wrote: >> --- a/filters/commit-links.sh >> +++ b/filters/commit-links.sh >> @@ -15,11 +15,14 @@ >> # CGIT_REPO_CLONE_URL ( = repo.clone-url setting ) >> # >> >> +regex='' >> + >> # This expression generates links to commits referenced by their SHA1. >> regex=$regex' >> -s|\b([0-9a-fA-F]{8,40})\b|<a href="./?id=\1">\1</a>|g' >> +s@(^|\s+)([0-9a-fA-F]{7,40})([^0-9a-fA-F]|$)@\1<a >> href="./?id=\2">\2</a>\3@g' >> + > > Can you explain why explicit prefix/postfix expressions are an improvement > over \b? > >> # This expression generates links to a fictional bugtracker. >> regex=$regex' >> -s| #([0-9]+)\b|<a href="http://bugs.example.com/?bug=\1">#\1</a>|g' >> +s@(^|\s+)#([0-9]+)([^0-9#]|$)@\1<a >> href="http://bugs.example.com/?bug=\2">#\2</a>\3@g' > > Ditto. > > -- > larsh
I think you're right, will send a new patch in a minute -- Ferry Huberts _______________________________________________ cgit mailing list [email protected] http://hjemli.net/mailman/listinfo/cgit
