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
import{remarkasremarFactory}from'remark';import{visit}from'unist-util-visit';constremark=remarFactory();// clean extra attributes that make it hard to see issuefunctionscrubber(tree){visit(tree,function(node){node.value=undefined;node.position=undefined;node.spread=undefined;node.lang=undefined;node.identifier=undefined;node.label=undefined;node.title=undefined;node.url=undefined;});}constcontent=`[a]: `;constoriginalAst=remark.parse(content);constnewContent=remark.stringify(originalAst);constnewAst=remark.parse(newContent);scrubber(originalAst);scrubber(newAst);console.log(JSON.stringify(originalAst,null,4));console.log(JSON.stringify(newAst,null,4));
Initial checklist
Affected packages and versions
1.2.4
Link to runnable example
https://stackblitz.com/edit/node-st1b3g?file=index.js
Steps to reproduce
Run
result is:
then
and the output text is
Expected behavior
definition content is preserved
Actual behavior
definition content disapepars
Runtime
Node v16
Package manager
npm v7
OS
Linux
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered: