forestryio / markdown-it-codeblock-type

Add `data-md-type` to your codeblocks for `md<->html`

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Markdown-it Codeblock Type

Flag the type of codeblock for conversion between markdown and html. Sometimes markdown-it will place the attribute on <code> and sometimes it will place it on <pre> that's the behavior of markdown-it.

Usage

import CodeblockType from "markdown-it-codeblock-type"
import MarkdownIt from "markdown-it"

// --

renderer = new MarkdownIt()
renderer.use(
  CodeblockType
)

About

Add `data-md-type` to your codeblocks for `md<->html`

License:MIT License


Languages

Language:JavaScript 95.6%Language:Shell 4.4%