Skip to content

Instantly share code, notes, and snippets.

@groovecoder
Created January 2, 2015 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save groovecoder/02bfab4e1eb146ee1cd2 to your computer and use it in GitHub Desktop.
Save groovecoder/02bfab4e1eb146ee1cd2 to your computer and use it in GitHub Desktop.
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