JSPM

slack-markdown-it

1.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 574
  • Score
    100M100P100Q96643F
  • License MIT

Plugin for Markdown-it to override default CommonMark standards to Slack standards.

Package Exports

  • slack-markdown-it

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (slack-markdown-it) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

slack-markdown-it

🚀 This plugin overrides default Github style to Slack style for syntax parser of the following:

  1. Bold (Using * bold * for strong emphasis instead of ** bold ** or __ bold __)

  2. Italic (Using _ italic _ for emphasis instead of * bold *)

  3. Strikethrough (Using ~ strikethrough ~ instead of ~~ strikethrough ~~)

Demo: https://codesandbox.io/embed/j2y24r3yq9

How to install 🛠️

npm install markdown-it-slack --save
yarn add markdown-it-slack

How to use 👨‍💻

Using import

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!`)

Using require

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.

License

MIT