Fix slack formatting bug (#4587)

This commit is contained in:
Raunak Bhagat
2025-04-24 10:18:54 -07:00
committed by GitHub
parent 91d6b739a4
commit 5d59850a17
2 changed files with 2 additions and 3 deletions

View File

@@ -88,7 +88,7 @@ def _split_text(text: str, limit: int = 3000) -> list[str]:
def _clean_markdown_link_text(text: str) -> str:
# Remove any newlines within the text
return text.replace("\n", " ").strip()
return format_slack_message(text).replace("\n", " ").strip()
def _build_qa_feedback_block(

View File

@@ -3,8 +3,7 @@ from mistune import Renderer # type: ignore
def format_slack_message(message: str | None) -> str:
renderer = Markdown(renderer=SlackRenderer())
return renderer.render(message)
return Markdown(renderer=SlackRenderer()).render(message)
class SlackRenderer(Renderer):