You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Logger now outputs ANSI escape sequences to stdout.
It should be possible to set an io.Writer in the cli/lg package where the logger will write HTML formatted output. (it should do nothing if such writer is not set)
When now a line of output is foo \x1b[31mbar\x1b[0m
It should become foo <span style="color:#A00">bar</span>,
Logger now outputs ANSI escape sequences to stdout.
It should be possible to set an io.Writer in the cli/lg package where the logger will write HTML formatted output. (it should do nothing if such writer is not set)
When now a line of output is
foo \x1b[31mbar\x1b[0m
It should become
foo <span style="color:#A00">bar</span>
,Some example here:
https://github.com/rburns/ansi-to-html/blob/master/src/ansi_to_html.js#L203
It would be better to wrap calls to log to directly output HTML-formatted outputs instead of converting it.
To achieve this a list as this one could be used, but for HTML instead of ANSI.
Implementing an "HTMLString" method like ShortString should work.
Please cover your code with tests.
The text was updated successfully, but these errors were encountered: