-
@wooorm Any advise on how should I start? All I can find is #1382 (comment) But I try to run that codes again, there are errors:
I hope to have an easy-to-use API to get estree AST with comments. |
Beta Was this translation helpful? Give feedback.
Answered by
JounQin
Mar 14, 2021
Replies: 1 comment 15 replies
-
Additional, remark-mdx's codes are not synced to npm. I tried to copy it locally and use it with: const unified = require('unified')
const parse = require('remark-parse')
const mdx = require('./remark-mdx')
const doc = `
<>
{/* MDX is awesome! */}
<div
// MDX is awesome!
style={{ color: "white", backgroundColor: "black", padding: "24px 32px" }}
></div>
</>;
`
const processor = unified().use(parse).use(mdx).freeze()
const root = processor.parse(doc)
console.log(root) The error is the same as above:
|
Beta Was this translation helpful? Give feedback.
15 replies
Answer selected by
ChristianMurphy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Additional, remark-mdx's codes are not synced to npm.
I tried to copy it locally and use it with:
The error is the same as above: