Broken link handler API is too inflexible
Currently, the BrokenLinkCallback API only allows preventing a broken link from being rendered as a link or altering the URL and/or title.
In order to achieve the "apply a CSS class which colors broken links red" result I wanted, I had to resort to emitting :BROKEN_LINK: as the new URL and then using a second pass with quick-xml to filter that out and set class="broken_link".
This sounds interesting, but implementing it it's not trivial because currently links have not more attributes and events are completely separated from rendering.
A similar approach should be used for images and maybe even other HTML elements.
I'm probably going to work around this without losing the original URL by replacing :BROKEN_LINK: with <original_url>#<uuid chosen at beginning of run> so that I can then check for and rsplit_once the #<uuid chosen at beginning of run> suffix in my postprocessing (now using lol-html) without worring about name collisions.