Skip to content

Commit 0ef2c8b

Browse files
feat: Add tests back for citations
1 parent 5b30291 commit 0ef2c8b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/slackBotFunction/app/slack/slack_events.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,7 @@ def convert_markdown_to_slack(body: str) -> str:
279279
body = re.sub(r"\*\*([^*]+)\*\*", r"*\1*", body)
280280

281281
# 4. Handle Lists (Handle various bullet points and dashes, inc. unicode support)
282-
list_separator_pattern = r"[ \t]*(?:(?:\\n|[\r\n]|[-•–—▪‣◦⁃])[ \t]*)+"
283-
body = re.sub(list_separator_pattern, r"\n- ", body)
282+
body = re.sub(r"(\u2022|-|•)\s", r"\n\g<0>", body)
284283

285284
# 5. Convert Markdown Links [text](url) to Slack <url|text>
286285
body = re.sub(r"\[([^\]]+)\]\(([^\)]+)\)", r"<\2|\1>", body)

0 commit comments

Comments
 (0)