bugdown: Open #-relative links in the same window.

Stream notifications shouldn't leave you with tons of Zulip windows.

(imported from commit e5ebfeff51f1e579d30a3a12eaf7341ef82f0449)
This commit is contained in:
Kevin Mehall
2013-11-25 17:24:27 -05:00
parent 3665a0e289
commit b8a6100d2e
2 changed files with 2 additions and 1 deletions

View File

@@ -545,7 +545,7 @@ class LinkPattern(markdown.inlinepatterns.Pattern):
el = markdown.util.etree.Element('a')
el.text = m.group(2)
el.set('href', href)
fixup_link(el)
fixup_link(el, target_blank = (href[:1] != '#'))
return el
def prepare_realm_pattern(source):

View File

@@ -3403,6 +3403,7 @@ NY-Haskell/events/108707682/?a=co1.1_grp&amp;rv=co1.1\">Haskell NYC Meetup</a></
('[YOLO](http://en.wikipedia.org/wiki/YOLO_(motto))',
'<p><a href="http://en.wikipedia.org/wiki/YOLO_(motto)" target="_blank" title="http://en.wikipedia.org/wiki/YOLO_(motto)"\
>YOLO</a></p>'),
('[Streams](#subscriptions)', '<p><a href="#subscriptions" title="#subscriptions">Streams</a></p>'),
('Sent to http_something_real@zulip.com', '<p>Sent to <a href="mailto:http_something_real@zulip.com" \
title="mailto:http_something_real@zulip.com">http_something_real@zulip.com</a></p>'),
('Sent to othello@zulip.com', '<p>Sent to <a href="mailto:othello@zulip.com" title="mailto:othello@zulip.com">\