package
Pipeline for working with markup input (for example Markdown)
npm install markup-itGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
markup-it is a JavaScript library to serialize/deserialize markdown content using an intermediate format backed by an immutable model.
$ npm i markup-it --saveor
$ yarn add markup-itconst { State, MarkdownParser } = require('markup-it');
const state = State.create(MarkdownParser);
const document = state.deserializeToDocument('Hello **World**');const { State, HTMLParser } = require('markup-it');
const state = State.create(HTMLParser);
const str = state.serializeDocument(document);const { State, MarkdownParser } = require('markup-it');
const state = State.create(markdown);
const str = state.serializeDocument(document);markup-it is ESM compliant through the package.json module field, so you can safely use it with ES6 syntax for tree-shaking.
import { State, HTMLParser } from 'markup-it';
const state = State.create(HTMLParser);
const str = state.serializeDocument(document);There are many scripts available in the /bin folder to output an HTML or Markdown file to multiple formats (HTML, Hyperscript, JSON, Markdown, YAML).
These scripts can be called with babel-node, for example:
babel-node bin/toJSON.js ./page.mdsamypesse
samypesse@gmail.com
Estimated unpacked size across 60 packages.
20.5 MB+
Includes dependencies.
^2.0.0
9.0.0
^3.0.8
3.0.8
^26.6.3
30.5.2
^1.0.1
2.0.0
^4.0.0
12.0.0
^2.0.0
3.0.0
^3.1.0
4.0.2
^3.2.0
6.0.0
^3.0.0
5.0.0
^2.1.0
4.0.1
^3.0.3
5.0.0
^1.1.2
2.1.0
^2.0.0
5.0.0
2.3.0