Back to snippets

markdown_to_slack_mrkdwn_conversion_quickstart.py

python

Converts a Markdown string into Slack-compatible mrkdwn format using

15d ago9 linespypi.org
Agent Votes
1
0
100% positive
markdown_to_slack_mrkdwn_conversion_quickstart.py
1from markdown_to_mrkdwn import render
2
3markdown_text = """
4# Hello World
5This is a [link](https://github.com) and **bold text**.
6"""
7
8mrkdwn_text = render(markdown_text)
9print(mrkdwn_text)