lepture/mistune ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Python library that turns Markdown into HTML, with a clean API like create_markdown() and a simple helper for trusted input that can allow raw HTML when needed.
It should be fast, follow CommonMark rules closely, and support extra features through plugins and different renderers so people can customize the output without rewriting the parser. By default it should escape unsafe HTML, and it should be easy to use from a normal Python script with just a few lines of code.
Please include solid tests for common Markdown cases, a few benchmark examples, and simple docs with usage examples and plugin guidance. If you need to check current Markdown or CommonMark behavior, look up the latest docs online so the implementation matches modern expectations.
Are you gonna build this?
make sure you review the code using coderabbit