Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one. Gulp and metalsmith plugins available. Used by Facebook, Docusaurus and many others! Use https://github.com/breakdance/breakdance for HTML-to-markdown conversion. Use https://github.com/jonschlinkert/markdown-toc to generate a table of contents.
MIT License
Bot releases are visible (Hide)
This major bump mostly improves and simplifies distribution.
lib
is not longer published to hide internals and allow us safely change themTo make esm/cjs interop safe we migrated to named exports in public api
- import Remarkable from 'remarkable';
- const utils = Remarkable.utils;
+ import { Remarkable, utils } from 'remarkable';
- const Remarkable = require('remarkable');
- const utils = Remarkable.utils;
+ const { Remarkable, utils } = require('remarkable');
- const Remarkable = window.Remarkable;
- const utils = Remarkable.utils;
+ // note: window namespace is lowercased
+ const { Remarkable, utils } = window.remarkable;
In order is reduce bundle size for browser builds linkify option is decoupled into own plugin
- import Remarkable from 'remarkable';
- new Remarkable({ html: true, linkify: true })
+ import { Remarkable } from 'remarkable';
+ import { linkify } from 'remarkable/linkify';
+ new Remarkable({ html: true }).use(linkify);
For the same reason we ditched large generated entities list in favour of dom trick in browser build.
Checkout bundlephobia to see results we achieved