Closed Jinjiang closed 8 months ago
Reproduction:
package.json:
{ "dependencies": { "remark-containers": "^1.2.0", "remark-parse": "^11.0.0", "unified": "^11.0.4" } }
test file:
import { unified } from 'unified' import markdown from 'remark-parse' import container from 'remark-containers' unified() .use(markdown) .use(container) .parse(`Hello World!`)
Error log:
remark TypeError: Cannot read properties of undefined (reading 'prototype') - /node_modules/.pnpm/remark-containers@1.2.0/node_modules/remark-containers/src/index.js:73:35 - /node_modules/.pnpm/unified@11.0.4/node_modules/unified/lib/index.js:636:36 - /node_modules/.pnpm/unified@11.0.4/node_modules/unified/lib/index.js:664:10
Thanks.
There was a rewrite of the markdown parser a few years ago and I haven't updated this plugin to support it. I think that's probably your issue here. I'd recommend using remark-directive as a replacement.
Reproduction:
package.json:
test file:
Error log:
Thanks.