What's Changed
Breaking Changes
This release upgrade marked
. The marked of this version includes a big change.
- support marked extension by using
onInit
option andmarked.use()
- #64
- marked remove old options
- Instead of it, you need to use
marked.use()
for extending behavior - https://marked.js.org/using_advanced#options
- remove @types/marked
- update to jsdom 24
- drop Node.js 16 support
- require Node.js 18+
Migration from safe-marked v15
marked removed old options.
The default behavior of the safe-marked has also changed. I think that using the next plugin will probably result in the same result.
import { createMarkdown } from "safe-marked";
+ import { gfmHeadingId } from "marked-gfm-heading-id";
+ import { mangle } from "marked-mangle";
const markdown = createMarkdown({
marked: {
+ // Add plugin to marked
+ onInit(marked) {
+ marked.use(gfmHeadingId());
+ marked.use(mangle());
+ }
}
});
const html = markdown(`# Header
<iframe src="https://example.com"></iframe>
This is [CommonMark](https://commonmark.org/) text.
`);
console.log(html);
Dependency Updates
- chore(deps): update actions/checkout action to v4 by @renovate in #70
- chore(deps): update actions/setup-node action to v4 by @renovate in #74
Full Changelog: v15.0.0...v16.0.0