[posthtml-md2html] is a markdown plugin for [PostHTML] that lets you use markdown within HTML elements in an easy and intuitive way.
Main features:
- Works on any tag with a
md
ormarkdown
property - Knows when to write inline or block-level content
- Will replace element if tag is
<md>
or<markdown>
- Will treat
pre
tag withmd
ormarkdown
property as<md>
tag
Before:
# Heading with *italics***Bold** paragraph| Head | row ||------|-----|| Data | row |> # Title>> This is blockquote paragraph
After:
Heading with italicsBold paragraphHeadrowDatarowTitleThis is blockquote paragraph
Install
npm i -S posthtml posthtml-md2html
Note: This project is compatible with node v10+
Usage
const fs = ;const posthtml = ;const posthtmlPlugin = ;;
Options
All options are passed to marked directly
Contributing
See PostHTML Guidelines and contribution guide.