--- config.py~	2004-05-06 10:58:51.000000000 +0100
+++ config.py	2004-05-06 10:58:24.000000000 +0100
@@ -51,6 +51,8 @@
     'attachments': None, # {'dir': path, 'url': url-prefix}
     'bang_meta': 0,
     'backtick_meta': 1,
+    # Sample url to bugzilla bug: 'http://leo.devel.pcs/bugzilla/show_bug.cgi?id=%s'
+    'bugzilla_url': '',
     'changed_time_fmt': '&nbsp;[%H:%M]',
     'charset': 'iso-8859-1',
     # if you have gdchart, add something like
--- parser/wiki.py~	2004-05-06 11:00:03.000000000 +0100
+++ parser/wiki.py	2004-05-06 10:25:45.000000000 +0100
@@ -80,6 +80,8 @@
 (?P<email>[-\w._+]+\@[\w-]+\.[\w.-]+)
 (?P<smiley>(?<=\s)(%(smiley)s)(?=\s))
 (?P<smileyA>^(%(smiley)s)(?=\s))
+(?P<bug>(?<=\W)[Bb][Uu][Gg]\d+)
+(?P<bugA>^[Bb][Uu][Gg]\d+)
 (?P<ent>[<>&])"""  % {
         'url': url_pattern,
         'punct': punct_pattern,
@@ -681,6 +683,15 @@
     _smileyA_repl = _smiley_repl
 
 
+    def _bug_repl(self, word):
+        self._check_p()
+        if not config.bugzilla_url:
+            return word
+        text = "%s #%s" % (word[0:3], word[3:])
+        return self.formatter.url(config.bugzilla_url % word[3:], text, 'external')
+
+    _bugA_repl = _bug_repl
+
     def _comment_repl(self, word):
         return ''
 
