diff --git a/zerver/lib/bugdown/__init__.py b/zerver/lib/bugdown/__init__.py index 5d5cfa3b7e..914ed1433b 100644 --- a/zerver/lib/bugdown/__init__.py +++ b/zerver/lib/bugdown/__init__.py @@ -658,7 +658,10 @@ class Bugdown(markdown.Extension): md.parser.blockprocessors.add('ulist', UListProcessor(md.parser), '>hr') + # Note that !gravatar syntax should be deprecated long term. + md.inlinePatterns.add('avatar', Avatar(r'!avatar\((?P[^)]*)\)'), '_begin') md.inlinePatterns.add('gravatar', Avatar(r'!gravatar\((?P[^)]*)\)'), '_begin') + md.inlinePatterns.add('usermention', UserMentionPattern(mention.find_mentions), '>backtick') md.inlinePatterns.add('emoji', Emoji(r'(?:[^:\s]+:)(?!\w)'), '_end') md.inlinePatterns.add('link', AtomicLinkPattern(markdown.inlinepatterns.LINK_RE, md), '>backtick')