bugdown: Decrease code duplication

(imported from commit 40158134b60e477d8a353d050fa62c9ded0e9e9f)
This commit is contained in:
Keegan McAllister 2012-10-21 20:35:36 -04:00
parent 649cd15415
commit 4db8587805
1 changed files with 5 additions and 4 deletions

View File

@ -22,10 +22,11 @@ class AutoLink(markdown.inlinepatterns.Pattern):
class Bugdown(markdown.Extension): class Bugdown(markdown.Extension):
def extendMarkdown(self, md, md_globals): def extendMarkdown(self, md, md_globals):
del md.inlinePatterns['image_link'] for k in ('image_link', 'image_reference'):
del md.inlinePatterns['image_reference'] del md.inlinePatterns[k]
del md.parser.blockprocessors['hashheader']
del md.parser.blockprocessors['setextheader'] for k in ('hashheader', 'setextheader'):
del md.parser.blockprocessors[k]
md.inlinePatterns.add('gravatar', Gravatar(r'!gravatar\((?P<email>[^)]*)\)'), '_begin') md.inlinePatterns.add('gravatar', Gravatar(r'!gravatar\((?P<email>[^)]*)\)'), '_begin')