aboutsummaryrefslogtreecommitdiffstats
path: root/slack/slack_message.py
diff options
context:
space:
mode:
Diffstat (limited to 'slack/slack_message.py')
-rw-r--r--slack/slack_message.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/slack/slack_message.py b/slack/slack_message.py
index 39d6e57..4301560 100644
--- a/slack/slack_message.py
+++ b/slack/slack_message.py
@@ -926,6 +926,11 @@ class SlackMessage:
characters_remove: List[str] = []
prev_style = prev_element.get("style", {})
cur_style = element.get("style", {})
+ if cur_style.get("code", False) != prev_style.get("code", False):
+ if cur_style.get("code"):
+ characters_apply.append("`")
+ else:
+ characters_remove.append("`")
if cur_style.get("bold", False) != prev_style.get("bold", False):
if cur_style.get("bold"):
colors_apply.append(weechat.color("bold"))
@@ -945,11 +950,6 @@ class SlackMessage:
characters_apply.append("~")
else:
characters_remove.append("~")
- if cur_style.get("code", False) != prev_style.get("code", False):
- if cur_style.get("code"):
- characters_apply.append("`")
- else:
- characters_remove.append("`")
prepend = "".join(
characters_remove[::-1]