slack-markdown-it
🚀 This plugin overrides default Github style to Slack style for syntax parser of the following:
-
Bold (Using * bold * for strong emphasis instead of ** bold ** or __ bold __)
-
Italic (Using _ italic _ for emphasis instead of * bold *)
-
Strikethrough(Using ~ strikethrough ~ instead of ~~ strikethrough ~~)
Demo: https://codesandbox.io/embed/j2y24r3yq9
🛠️
How to install - It's written as plugin for Markdown so it requires
markdown-it
to be installed.
npm install markdown-it --save
yarn add markdown-it
- Install using
npm
oryarn
npm install slack-markdown-it --save
yarn add slack-markdown-it
👨💻
How to use
import
Using import Markdown from "markdown-it";
import MarkdownSlack from 'slack-markdown-it';
const md = Markdown();
md.use(MarkdownSlack);
md.renderInline(`*This is me in bold*, and he is in _italic_. Don't ~strikethrough~ me!`)
require
Using const md = require('markdown-it')();
md.use(require('slack-markdown-it'));
md.renderInline(`*This is me in bold*, and he is in _italic_. Don't ~strikethrough~ me!`)
🏹 👩🔬
Coming soon -
Customize which syntax to override.
-
Optimization for tag rendering.
-
Test coverage.