mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
nimpretty: fixes #9673 [backport]
(cherry picked from commit 532647171e)
This commit is contained in:
@@ -246,7 +246,7 @@ proc emitTok*(em: var Emitter; L: TLexer; tok: TToken) =
|
||||
wr(TokTypeToStr[tok.tokType])
|
||||
if not em.inquote: wr(" ")
|
||||
of tkOpr, tkDotDot:
|
||||
if tok.strongSpaceA == 0 and tok.strongSpaceB == 0:
|
||||
if (tok.strongSpaceA == 0 and tok.strongSpaceB == 0) or em.inquote:
|
||||
# bug #9504: remember to not spacify a keyword:
|
||||
lastTokWasTerse = true
|
||||
# if not surrounded by whitespace, don't produce any whitespace either:
|
||||
|
||||
@@ -357,3 +357,6 @@ proc fun3() =
|
||||
##[
|
||||
foobar
|
||||
]##
|
||||
|
||||
# bug #9673
|
||||
discard `* `(1, 2)
|
||||
|
||||
@@ -366,3 +366,6 @@ proc fun3() =
|
||||
##[
|
||||
foobar
|
||||
]##
|
||||
|
||||
# bug #9673
|
||||
discard `*`(1, 2)
|
||||
|
||||
Reference in New Issue
Block a user