buildkite / terminal-to-html

Converts arbitrary shell output (with ANSI) into beautifully rendered HTML
http://buildkite.github.io/terminal-to-html
MIT License
651 stars 45 forks source link

Colors that span multiple lines should include a new span per line #3

Closed keithpitt closed 10 years ago

keithpitt commented 10 years ago

Currently, the output renders like this:

some text <span class="c123">and this
this is colored</span>

The problem with this approach, is that if you wanted to wrap each line in a <div>, we've just broken our markup.

<div>some text <span class="c123">and this</div>
<div>this is colored</span></div>

If we have colors that span multiple lines, we should include <span> elements on each line, line so:

some text <span class="c123">and this</span>
<span class="c123">this is colored</span>