This commit is contained in:
Andreas Rumpf
2019-06-03 08:46:57 +02:00
committed by GitHub
parent 1d1c72dfbb
commit a68fe3d082
2 changed files with 5 additions and 2 deletions

View File

@@ -122,6 +122,9 @@
- ``case object`` branch transitions via ``system.reset`` are deprecated.
Compile your code with ``-d:nimOldCaseObjects`` for a transition period.
- base64 module: The default parameter `newLine` for the `encode` procs
was changed from `"\13\10"` to the empty string `""`.
#### Breaking changes in the compiler

View File

@@ -110,7 +110,7 @@ template encodeInternal(s: typed, lineLen: int, newLine: string): untyped =
#assert(r == result.len)
discard
proc encode*[T:SomeInteger|char](s: openarray[T], lineLen = 75, newLine="\13\10"): string =
proc encode*[T:SomeInteger|char](s: openarray[T], lineLen = 75, newLine=""): string =
## Encodes ``s`` into base64 representation. After ``lineLen`` characters, a
## ``newline`` is added.
##
@@ -126,7 +126,7 @@ proc encode*[T:SomeInteger|char](s: openarray[T], lineLen = 75, newLine="\13\10"
assert encode([1, 2, 3, 4, 5]) == "AQIDBAU="
encodeInternal(s, lineLen, newLine)
proc encode*(s: string, lineLen = 75, newLine="\13\10"): string =
proc encode*(s: string, lineLen = 75, newLine=""): string =
## Encodes ``s`` into base64 representation. After ``lineLen`` characters, a
## ``newline`` is added.
##