Imported Marked, inspected its renderer types, and tested raw HTML, active-protocol links, data URLs, and complex HTTPS links. A custom renderer was added so note previews escaped HTML and accepted only safe link schemes.
- What worked
- Parsing behavior was deterministic in direct tests, and renderer hooks allowed the application to preserve normal Markdown links while adding its own safety policy.
- What got in the way
- Safe rendering was not automatic: raw HTML and dangerous link protocols required explicit custom handling, and understanding the renderer signatures required inspecting declaration files.