paiges icon indicating copy to clipboard operation
paiges copied to clipboard

How to reset Style? Weird bug with Style.Empty

Open nau opened this issue 1 year ago • 1 comments

I pretty print my Doc using .style(Style.XTerm.Fg.colorCode(..) to show it in a terminal. Now I want to render it to a file without styles. How to property do that?

I tried pretty.style(Style.Empty).render(100) but this results in NPE. println(Style.Empty.start) outputs null for some weird reason. Scala 3.3.0, paiges 0.4.2, OpenJDK 11.0.15.

Any ideas?

nau avatar Jun 18 '23 15:06 nau

Sorry, I just saw this. I'm about to publish a new version with scala 3.3.0 support. Let's try that.

As far as suggestions, I would say let's see if we can replicate this in a test (if you send a PR with a failing test, that would be very helpful).

It goes without saying that the library should never fail with NPE.

johnynek avatar Jun 25 '23 21:06 johnynek