This works better if there are distinct escape sequences to mark the start and end of stderr output, as in DomTerm (http://domterm.org/Wire-byte-protocol.html#Special-sequences...). I created a fork (https://github.com/PerBothner/stderred) of stderrred: If DOMTERM is set, then it uses the DomTerm-specific escape sequences. This has two advantages:
- If the error message has ANSI escape sequences (like gcc does), then you get an ugly initially-red output line. - You can do fancier styling with CSS, since the DomTerm escape sequence creates an element explicitly marked as error output, which is more semantically meaningful than "red".