mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-31 13:42:50 +00:00
The html-ish pass feeds markdown to htmlparser2 so it can render <details>, <img> and friends. htmlparser2 reads any `<` followed by a letter as a tag and collects attributes up to the next `>`. A cell such as `1<ratio<2` in a table therefore swallowed the rows after it, and the re-serialized "tag" dropped the newlines and pipes that made them rows. The same path broke autolinks (`<https://x/y>` became `<https: x y>`) and cut text after a trailing `a<b`. Only hand htmlparser2 what CommonMark reads as raw HTML: open tags, closing tags and comments. Every other `<` stays text. Unknown tags are rendered back as text, but they were rebuilt from the parser's lowercased name and attributes, so `As<Integer>()` showed as `As<integer>()`. Echo the source slice instead.