ansi-html-stream icon indicating copy to clipboard operation
ansi-html-stream copied to clipboard

Bugfix: No longer changes input theme

Open alex-ozdemir opened this issue 8 years ago • 0 comments

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.

alex-ozdemir avatar Aug 04 '16 02:08 alex-ozdemir