ansi-html-stream
ansi-html-stream copied to clipboard
Bugfix: No longer changes input theme
Internally createStream
mutates the options.theme
input, causing
re-use of the same options to result in a bug. This seems undesirable,
users should be able to write code like:
const ansi = require('ansi-html-stream');
const my_options = {theme: ...};
var stream1 = ansi(my_options);
var stream2 = ansi(my_options);
and expect both streams to work properly.
Before this fix the coloring for stream2
would break. Now it doesn't.