[llvm-commits] [patch] demo website colored terminal/clang output
David Blaikie
dblaikie at gmail.com
Fri Aug 5 12:10:45 PDT 2011
> I think there is something wrong with the regex in syntaxHighlightConsoleOutput. I'm trying to debug it right now.
Ah, sorry about that then - I saw you'd checked in the CSS changes &
thought you might be experimenting with the perl changes.
Is there any particular scenario where it's breaking? I'll certainly
try to set myself up a more accurate testing environment so I can
better validate changes in the future.
Oh, I think I know what's going on...
By generating HTML first, then escaping it - I assume it's all coming
out as rendered HTML to the user (they're seeing <span> tags, etc in
the output)?
I wonder whether escapeHTML would escape the \033 control code used by
the terminal coloring? If so, then we could adjust the regex to use
the post-escaped version of the control code (& maybe semicolon too?
if that's also being escaped by escapeHTML) & do the coloring on the
post-escaped value
(syntaxHighlightConsoleOutput($c->escapeHTML($result)) instead of the
other way around as it is now).
Should've guessed/seen even that without testing it.
- David
More information about the llvm-commits
mailing list