4 ms·
Just looked at my code. It was "real->decimal-string" It includes the decimal point, even when the "digits" parameter is 0. Minor, but when throwing a tiny page
by uxp100 7y ago
Just looked at my code.
It was "real->decimal-string" It includes the decimal point, even when the "digits" parameter is 0. Minor, but when throwing a tiny page together I probably spent 10% of my time just figuring out where that function lived and that there wasn't some other routine I should be using (though it sounds like there actually is). So I changed the format string to "~a~a~a~a" from "~a~a.~a" and did (if (zero? digits) "" "."). Potentially the existing behavior is correct for scheme compatibility?
I'm not web guy, my changes are pretty haphazard, but I'm not the first person to notice this. https://github.com/racket/scribble/pull/62 https://github.com/racket/scribble/pull/62 is a rejected pull request (with you as a reviewer, so I'm sure you know that it doesn't work well currently, on my iPhone SE at least, maybe larger form factor phones do better)