silkfire / Pastel

Snazz up your console output!
MIT License
405 stars 24 forks source link

Remove DISABLE_NEWLINE_AUTO_RETURN on Windows to fix unintended \n behaviour #14

Closed JamJar00 closed 5 years ago

JamJar00 commented 5 years ago

Because DISABLE_NEWLINE_AUTO_RETURN is set on Windows systems the behaviour of \n is changed so it no longer outputs Carriage Return characters and only outputs Line Feeds. I suspect this is unintended behaviour for Pastel as code such as

Console.WriteLine(Output.BrightGreen("Hello World!\nThis is an example of a bug!"));

renders as image There's a good discussion of this property here which seems to suggest it's only intended for us on some very specific (emacs) circumstances.

Cheers!

JamJar00 commented 5 years ago

@silkfire I've already had this fix accepted on Crayon here!

silkfire commented 5 years ago

@JamJar00 Wow, that's strange. I'm positive I didn't see it until now :)

silkfire commented 5 years ago

I'll upload the new version to NuGet shortly.

JamJar00 commented 5 years ago

Glad I could help!