NestBot: Fix ** bold markdown formatting for Slack responses (ref #2663)
- Dominant language
- Python
- Stars
- 451
- Forks
- 707
- Avg merge
- 22h 59m
- Merged PRs (30d)
- 91
Description
## Describe the bug
Slack uses single asterisk markdown (`*text*`) for bold formatting.
However, NestBot sometimes returns responses containing double asterisks (`**text**`).
Slack does not render `**bold**` correctly, so users see the literal `**` characters instead of bold text.
This results in:
- broken formatting
- poor readability
- unpolished bot responses
## To Reproduce
Steps to reproduce the behavior:
1. Ask NestBot any question
2. Wait for an AI response that contains formatted text
3. If the message includes `**bold text**`, Slack displays the literal `**` characters
4. Bold formatting does not render
Example output:
Here are the important steps to follow
Displayed in Slack as:
Here are the **important** steps to follow
(instead of bold text)
## Expected behavior
NestBot responses should follow Slack markdown rules.
Bold text should render correctly using:
**instead of:**
All AI-generated responses should automatically convert markdown into Slack-compatible formatting before posting.
## Are you going to work on fixing this?
- [x] Yes
- [ ] No
## Additional context
This appears to happen because standard Markdown (`**bold**`) is passed directly to Slack without conversion.
Slack formatting rules differ slightly and require single asterisks.
### Proposed fix
Normalize markdown before sending messages to Slack.
Suggested location:
`backend/apps/slack/utils.py
`
Refernce #2663
Contributor guide
Research direction
Start in backend/apps/slack/utils.py, the suggested location for normalizing responses before they are sent to Slack. Reproduce a response containing **bold text**, then verify that the posted message uses single asterisks and no longer displays literal double-asterisk markers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100