Skip to content

Commit 22a17fb

Browse files
committed
theme: add heading-style for zt_dark
In order to emphasise the heading tags ranging from h1 to h6, they have been displayed with a different colour. This is to fix issue zulip#1095
1 parent 793e73d commit 22a17fb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

zulipterminal/themes/zt_dark.py

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
'msg_emoji' : (Color.LIGHT_MAGENTA, Color.BLACK),
3232
'reaction' : (Color.LIGHT_MAGENTA__BOLD, Color.BLACK),
3333
'reaction_mine' : (Color.BLACK, Color.LIGHT_MAGENTA),
34+
'msg_heading' : (Color.LIGHT_CYAN__BOLD, Color.DARK_MAGENTA),
3435
'msg_math' : (Color.LIGHT_GRAY, Color.DARK_GRAY),
3536
'msg_mention' : (Color.LIGHT_RED__BOLD, Color.BLACK),
3637
'msg_link' : (Color.LIGHT_BLUE, Color.BLACK),

zulipterminal/ui_tools/boxes.py

+3
Original file line numberDiff line numberDiff line change
@@ -1236,6 +1236,9 @@ def soup2markup(
12361236
text = unrendered_tags[tag]
12371237
if text:
12381238
markup.append(unrendered_template.format(text))
1239+
elif tag in ("h1", "h2", "h3", "h4", "h5", "h6"):
1240+
# HEADING STYLE (for all heading style tags – h1 to h6)
1241+
markup.append(("msg_heading", tag_text))
12391242
elif tag in ("p", "del"):
12401243
# PARAGRAPH, STRIKE-THROUGH
12411244
markup.extend(cls.soup2markup(element, metadata)[0])

0 commit comments

Comments
 (0)