summary refs log tree commit diff stats
diff options
context:
space:
mode:
authornarimiran <narimiran@disroot.org>2019-09-27 10:36:22 +0200
committernarimiran <narimiran@disroot.org>2019-09-27 10:36:22 +0200
commitf804245087615c8258386d211f9c6f27a10191cb (patch)
tree1af22ba03b377c03e239e4757d241aff11cddea6
parente0cd52365c03a5896382460c7320fe5643a3ddfb (diff)
downloadNim-f804245087615c8258386d211f9c6f27a10191cb.tar.gz
[backport] fix nimpretty removing space before pragma
-rw-r--r--compiler/layouter.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/layouter.nim b/compiler/layouter.nim
index 0c888b455..7c1c9d16c 100644
--- a/compiler/layouter.nim
+++ b/compiler/layouter.nim
@@ -499,7 +499,8 @@ proc emitTok*(em: var Emitter; L: TLexer; tok: TToken) =
     rememberSplit(splitComma)
     wrSpace em
   of openPars:
-    if tok.strongSpaceA > 0 and not em.endsInWhite and not em.wasExportMarker:
+    if tok.strongSpaceA > 0 and not em.endsInWhite and
+        (not em.wasExportMarker or tok.tokType == tkCurlyDotLe):
       wrSpace em
     wr(em, TokTypeToStr[tok.tokType], ltSomeParLe)
     rememberSplit(splitParLe)