Commit 42286c43 authored by Lysander Trischler's avatar Lysander Trischler
Browse files

Add hashes in front of hash tags

parent f73a824d
......@@ -104,7 +104,8 @@ class TwtsListBox(widgets.VimListBox):
elif isinstance(token, (twtxtparser.TwtxtLink, twtxtparser.MarkdownLink)):
if token.title:
link = "%s <%s>" % (token.title, token.url)
bang = "#" if isinstance(token, twtxtparser.TwtxtLink) else ""
link = "%s%s <%s>" % (bang, token.title, token.url)
else:
link = token.url
markup.append(("link-normal", link))
......@@ -281,7 +282,8 @@ class URLListBox(widgets.VimListBox):
self._tokens.append(token)
markup = ["%2d: " % len(self._tokens)]
if hasattr(token, "title") and token.title:
markup.append("%s – " % token.title)
bang = "#" if isinstance(token, twtxtparser.TwtxtLink) else ""
markup.append("%s%s – " % (bang, token.title))
markup.append(("link-normal", token.url))
items.append(widgets.SelectableAttrMap(urwid.Text(markup), twtxtrenderer.read_normal_map, twtxtrenderer.read_focus_map))
preferred_weighted_indices.append((1, len(self._tokens) - 1))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment