From b3c3557c338c6cb0992abf9d2d877e927d815ea3 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Thu, 19 Nov 2020 12:12:51 -0800 Subject: fix #16025 repr now consistent: does not insert trailing newline (#16034) --- lib/system/repr.nim | 3 ++- lib/system/reprjs.nim | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/system') diff --git a/lib/system/repr.nim b/lib/system/repr.nim index 318e95ebb..ae51a4aab 100644 --- a/lib/system/repr.nim +++ b/lib/system/repr.nim @@ -325,5 +325,6 @@ when not defined(useNimRtl): else: var p = p reprAux(result, addr(p), typ, cl) - add result, "\n" + when defined(nimLegacyReprWithNewline): # see PR #16034 + add result, "\n" deinitReprClosure(cl) diff --git a/lib/system/reprjs.nim b/lib/system/reprjs.nim index 9c27a4721..36972024a 100644 --- a/lib/system/reprjs.nim +++ b/lib/system/reprjs.nim @@ -237,4 +237,5 @@ proc reprAny(p: pointer, typ: PNimType): string {.compilerRtl.} = var cl: ReprClosure initReprClosure(cl) reprAux(result, p, typ, cl) - add(result, "\n") + when defined(nimLegacyReprWithNewline): # see PR #16034 + add result, "\n" -- cgit 1.4.1-2-gfad0