kroitor / asciichart

Nice-looking lightweight console ASCII line charts ╭┈╯ for NodeJS, browsers and terminal, no dependencies
MIT License
1.84k stars 94 forks source link

Removed rstrip() for proper line blanking #51

Open DoktorJ opened 4 years ago

DoktorJ commented 4 years ago

The addition of .rstrip() to the return output broke line blanking when overwriting the same screen space; removed it to restore previous behavior.

kroitor commented 4 years ago

This is strange, but it breaks the tests somehow. I will investigate and will get back to you with my findingds. In the meantime, if you could check the error here https://travis-ci.org/github/kroitor/asciichart/builds/698977078?utm_source=github_status&utm_medium=notification it would help speed up the process. Thx!

DoktorJ commented 3 years ago

Sorry, I'm just now getting to this; I apparently had a mail filtering issue and never saw the notifications...

It looks like the test is failing because the "expected" graph has no whitespace while the actual graph does (which is the point of removing .rstrip(). I unfortunately do not understand enough about the CI tests to grok how the original PR that added .rstrip() didn't fail its test (since to pass tests prior to that PR, the whitespace would have to have been expected, but would then be absent after the inclusion of .rstrip()), but basically it just needs to happen in reverse: the test needs to be told to expect trailing whitespace on the rendered graph.