Skip to content

Commit

Permalink
[backport] fix nimpretty removing space before pragma
Browse files Browse the repository at this point in the history
(cherry picked from commit f804245)
  • Loading branch information
narimiran committed Sep 30, 2019
1 parent 1ae9cac commit 6c1f389
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/layouter.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6c1f389

Please sign in to comment.