muesli / termenv

Advanced ANSI style & color support for your terminal applications
MIT License
1.74k stars 70 forks source link

Nested styles? #35

Open jwalton opened 3 years ago

jwalton commented 3 years ago

The README.md claims this supports nested styles, but I didn't see any examples. I tried:

    colorful := termenv.String("colorful").Foreground(termenv.ANSIRed)
    hello := termenv.String("Hello", colorful.String(), "world").Foreground(termenv.ANSIBlue).String()
    fmt.Println(hello)

But this printed something blue then red then white, instead of the expected blue then red then blue.

(BTW - slick library. I wish I'd found this before I ported all of chalk to go. :P)

malko commented 6 months ago

is there any plan on solving this issue in a near future ?