Skip to content

Commit

Permalink
bugdown/__init__.py: Fix line with length greater than 120.
Browse files Browse the repository at this point in the history
This updates file zerver/lib/bugdown/__init__.py.
  • Loading branch information
taranjeet authored and timabbott committed Aug 19, 2016
1 parent 1819157 commit 5e5ad9d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions zerver/lib/bugdown/__init__.py
Expand Up @@ -347,7 +347,8 @@ def youtube_image(self, url):
# Youtube video id extraction regular expression from http://pastebin.com/KyKAFv1s
# If it matches, match.group(2) is the video id.
youtube_re = r'^((?:https?://)?(?:youtu\.be/|(?:\w+\.)?youtube(?:-nocookie)?\.com/)' + \
r'(?:(?:(?:v|embed)/)|(?:(?:watch(?:_popup)?(?:\.php)?)?(?:\?|#!?)(?:.+&)?v=)))?([0-9A-Za-z_-]+)(?(1).+)?$'
r'(?:(?:(?:v|embed)/)|(?:(?:watch(?:_popup)?(?:\.php)?)?(?:\?|#!?)(?:.+&)?v=)))' + \
r'?([0-9A-Za-z_-]+)(?(1).+)?$'
match = re.match(youtube_re, url)
if match is None:
return None
Expand Down Expand Up @@ -957,7 +958,9 @@ def extendMarkdown(self, md, md_globals):
'>backtick')
md.inlinePatterns.add('usermention', UserMentionPattern(mention.find_mentions), '>backtick')
md.inlinePatterns.add('emoji', Emoji(r'(?<!\w)(?P<syntax>:[^:\s]+:)(?!\w)'), '_end')
md.inlinePatterns.add('unicodeemoji', UnicodeEmoji(u'(?<!\\w)(?P<syntax>[\U0001F300-\U0001F64F\U0001F680-\U0001F6FF\u2600-\u26FF\u2700-\u27BF])(?!\\w)'), '_end')
md.inlinePatterns.add('unicodeemoji', UnicodeEmoji(
u'(?<!\\w)(?P<syntax>[\U0001F300-\U0001F64F\U0001F680-\U0001F6FF\u2600-\u26FF\u2700-\u27BF])(?!\\w)'),
'_end')

md.inlinePatterns.add('link', AtomicLinkPattern(markdown.inlinepatterns.LINK_RE, md), '>backtick')

Expand Down

0 comments on commit 5e5ad9d

Please sign in to comment.