mirror of https://github.com/zulip/zulip.git
bugdown: Decrease code duplication
(imported from commit 40158134b60e477d8a353d050fa62c9ded0e9e9f)
This commit is contained in:
parent
649cd15415
commit
4db8587805
|
@ -22,10 +22,11 @@ class AutoLink(markdown.inlinepatterns.Pattern):
|
|||
|
||||
class Bugdown(markdown.Extension):
|
||||
def extendMarkdown(self, md, md_globals):
|
||||
del md.inlinePatterns['image_link']
|
||||
del md.inlinePatterns['image_reference']
|
||||
del md.parser.blockprocessors['hashheader']
|
||||
del md.parser.blockprocessors['setextheader']
|
||||
for k in ('image_link', 'image_reference'):
|
||||
del md.inlinePatterns[k]
|
||||
|
||||
for k in ('hashheader', 'setextheader'):
|
||||
del md.parser.blockprocessors[k]
|
||||
|
||||
md.inlinePatterns.add('gravatar', Gravatar(r'!gravatar\((?P<email>[^)]*)\)'), '_begin')
|
||||
|
||||
|
|
Loading…
Reference in New Issue