You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm sorry that I am not very good at English, to find some helpful information from issues seems to be difficult for me.
Context
I want to for-each all the image node and migrate images to a new path, which means steps as follow:
Parse markdown to AST
Change AST
Parse AST to markdown
import{Parser}from'commonmark'constmd=`![](./image/1.jpg)`constwalker=parser.parse(md).walker()letevent=nullwhile((event=walker.next())){if(event.entering&&event.node.type==='image'){// moveconstfilepath=mv(event.node.destination)// changeevent.node.destination=filepath}}// TODO: How to "re" parse AST to markdown?
The text was updated successfully, but these errors were encountered:
Question
How to "re" parse AST to markdown?
Context
I want to
for-each
all theimage
node and migrate images to a new path, which means steps as follow:The text was updated successfully, but these errors were encountered: