Replies: 1 comment 4 replies
-
This sounds a bit like it may be an XY problem: you’re asking for a solution, but maybe your question is different. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there
Was wondering how you can take a string of MDX and replace the markdown elements e.g. headings, lists etc, and then return another string.
Input:
Expected output:
Not sure if there is a combination of
mdx
and/orremark
/unist
libraries one can use to achieve this parsing?You can always run the string through something like
markdown-it
, but ideally I'd like to stick to MDX-related libs.Am aware of things like
next-mdx-remote
and@mdx-js/react
to handle rendering, but here I'm concerned with string -> string only.Any help appreciated. Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions