fusesource / jansi

Jansi is a small java library that allows you to use ANSI escape sequences to format your console output which works even on windows.
http://fusesource.github.io/jansi/
Apache License 2.0
1.11k stars 140 forks source link

What to use in place of render? #184

Closed boxleytw closed 3 years ago

boxleytw commented 3 years ago

I've updated to latest Jansi from an older version. Previously, I used code such as (Kotlin; Java is similar):

        println(ansi().render("""
@|bold f($n) = ${fib.char}|@
@|green F($n) = $fib|@
@|blue 1/F($n) = ${fib.multInv}|@
@|magenta det(F($n)) = ${fib.det}|@
@|yellow tr(F($n)) = ${fib.tr}|@
""".trim()))

I note the render method has gone away, and format does not seem to process the ANSI instructions for @|...|@ bits in my string, and AnsiRenderer has gone away.

What is suggested to do in it's place? I know about methods such as bold, but prefer being able to use string templates.

Thanks!

gnodet commented 3 years ago

I'll see if I can put the AnsiRenderer back.