phothinmg/peisar ? reverse-engineered prompt
Reverse engineered prompt
Build me a practical Markdown parser in Rust that can turn a Markdown string into HTML and also expose the parsed document as an AST.
It should handle CommonMark, GitHub flavored Markdown features like tables, strikethrough, task lists, autolinks, plus YAML front matter at the top of the file. I also want support for Kramdown style block attributes, source spans on nodes, and a way to inspect or walk the tree so I can tweak nodes while parsing or after parsing.
Please make it work as both a Rust library and a Node.js package, with TypeScript types for the JS side. For browser use, add a WebAssembly build too so it can run in Vite or other client side apps. Keep the API simple, something like creating a document from Markdown and then reading its HTML, AST, and front matter. If you need to check current setup details or docs, look them up online.
Are you gonna build this?
make sure you review the code using coderabbit