base64
base64 copied to clipboard
Docs give conflicting info about newlines in urlsafe_encode64 output
I was reading the current rdocs for Base64, and in the Newlines section it says:
An encoded string returned by Base64.encode64 or Base64.urlsafe_encode64 has an embedded newline character after each 60-character sequence, and, if non-empty, at the end:
However, in the section for urlsafe_encode64 it says:
The returned string will have no newline characters, regardless of its length; see Newlines above:
I read the source and it looks like the method comment is correct, and the encoded output (because it uses #strict_encode64) will not contain newlines.
I will submit a pull request momentarily to update the docs.