Created
January 2, 2015 18:01
-
-
Save groovecoder/02bfab4e1eb146ee1cd2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
regex = re.compile('(bug)\s+#?(\d+)', re.IGNORECASE) | |
content = regex.sub( | |
jinja2.Markup('<a href="https://bugzilla.mozilla.org/' | |
'show_bug.cgi?id=\\2" ' | |
'target="_blank">\\1 \\2</a>'), | |
content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment