Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lyse
tt
Commits
42286c43
Commit
42286c43
authored
Jan 04, 2021
by
Lysander Trischler
Browse files
Add hashes in front of hash tags
parent
f73a824d
Changes
1
Hide whitespace changes
Inline
Side-by-side
tt
View file @
42286c43
...
...
@@ -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
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment