hello<span style='color: #5555FF; background-color: #FF5555;'> world</span><span style='background-color: #FF5555;'> yow</span>za

[1] "hello<span style='color: #5555FF; background-color: #FF5555;'> world</span><span style='background-color: #FF5555;'> yow</span>za"

hello<span style='background-color: #FF5555;'> world yow</span>za

Argument `x` contains a CSI SGR sequence with unknown substrings or a OSC hyperlink with unsupported parameters at index [1], see `?unhandled_ctl`; you can use `warn=FALSE` to turn off these warnings.

[1] "hello<span style='background-color: #FF5555;'> world yow</span>za"

Warning in to_html_int(x = x, warn = warn, term.cap = term.cap, classes = classes,  :
  Argument `x` contains a CSI SGR sequence with unknown substrings or a OSC hyperlink with unsupported parameters at index [1], see `?unhandled_ctl`; you can use `warn=FALSE` to turn off these warnings.

# A string that shrinks; multiple repeated SGRs reduced to a single span

[1] "<span style='color: #BB0000;'>hello world</span>"

<span style='color: #BB0000;'>hello</span><span style='background-color: #00BB00;'> world</span>

[1] "<span style='color: #BB0000;'>hello</span><span style='background-color: #00BB00;'> world</span>"

[1] "<span style='color: #BBBB00;'>hello</span>"
[2] "<span style='color: #BBBB00;'>world</span>"

<span style='color: #BBBB00; background-color: #0000BB;'>world</span>

[1] "<span style='color: #BBBB00;'>hello</span>"                           
[2] "<span style='color: #BBBB00; background-color: #0000BB;'>world</span>"

<span style='color: #BBBB00;'>hello</span>
<span style='color: #BBBB00;'>wor</span><span style='color: #BBBB00; background-color: #0000BB;'>ld</span>

[1] "<span style='color: #BBBB00;'>hello</span>"                                                                
[2] "<span style='color: #BBBB00;'>wor</span><span style='color: #BBBB00; background-color: #0000BB;'>ld</span>"

[1] "he<span style='color: #BBBB00;'>llo</span>"
[2] "<span style='color: #BBBB00;'>world</span>"

[1] "he<span style='color: #BBBB00;'>llo</span>"                           
[2] "<span style='color: #BBBB00; background-color: #0000BB;'>world</span>"