-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
Unfortunately marked changed the function signatures on the renderer object.
I have some code to alter renderer behavior:
import {marked} from 'marked';
const markdownRenderer = new marked.Renderer();
markdownRenderer.heading = (text, level, raw) => {
// ...
};
markdownRenderer.table = (header, body) => {
// ...
};
markdownRenderer.code = (_code, infostring, escaped) => {
// ...
};and then I provide that renderer like this:
import markdown from '@metalsmith/markdown';
Metalsmith(path.resolve())
// ...
.use(markdown({
renderer: markdownRenderer
}))
// ...markedjs/marked#3291 made it so renderers created with marked v13+ code are incompatible with <v13 versions of marked, and this plugin's version is quite old.
Maybe a warning about compatible versions of marked would suffice? I suspect this plugin's version of marked is being held back intentionally based on #70.
An eventual major upgrade of this plugin might be nice, and I'm sure you had other items for its roadmap.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels