MD2Slack is a Python package that converts Markdown into Slack-compatible formatting.
Easily transform Markdown syntax into a format that works seamlessly in Slack messages, preserving formatting like bold, italics, headers, lists, tables, and code blocks.
- Converts standard Markdown syntax to Slack-formatted text
- Supports headers, lists, blockquotes, code blocks, and tables
- Handles inline styles (bold, italics, strikethrough, and links)
- Preserves Slack-specific mentions (
@user,#channel) - Lightweight and efficient
You can install MD2Slack via pip:
pip install md2slackConvert Markdown text into Slack-formatted output:
from md2slack import SlackMarkdown
parser = SlackMarkdown()
slack_text = parser("## Hello *world*")
print(slack_text) # Outputs: *Hello _world_*I welcome contributions! Follow these steps to contribute:
- Fork the repository
- Clone your fork locally
git clone https://github.com/MayzTex/md2slack.git cd md2slack - Create a new branch
git checkout -b feature-branch
- Make changes & commit
git add . git commit -m "Added new feature"
- Push & open a Pull Request
git push origin feature-branch
To run tests locally:
pytestMD2Slack is licensed under the MIT License. See the LICENSE file for details.
If you find this project useful, consider starring it on GitHub.
For issues or feature requests, please open an issue.