Skip to content

Commit

Permalink
Avoid making --- in the message to a h2 (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
volker-fr authored Jan 13, 2025
1 parent eeb7d8e commit c8e6bd0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions slackviewer/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ def render_text(self, message, process_markdown=True):
if process_markdown:
# Handle bold (convert * * to ** **)
message = re.sub(r'\*', "**", message)
# Make sure --- won't wrap the previous line with <h2>
message = re.sub(r'---', "\\-\\-\\-", message)

message = markdown2.markdown(
message,
Expand Down

0 comments on commit c8e6bd0

Please sign in to comment.