nimpretty: yet another improvement

(cherry picked from commit 0193c8ad2e)
This commit is contained in:
Araq
2019-07-09 10:08:23 +02:00
committed by narimiran
parent 12baecb42d
commit e0b4d034bc
3 changed files with 21 additions and 1 deletions

View File

@@ -302,7 +302,7 @@ template rememberSplit(kind) =
proc emitMultilineComment(em: var Emitter, lit: string, col: int) =
# re-align every line in the multi-line comment:
var i = 0
var lastIndent = em.indentStack[^1]
var lastIndent = if em.keepIndents > 0: em.indentLevel else: em.indentStack[^1]
var b = 0
var dontIndent = false
for commentLine in splitLines(lit):

View File

@@ -731,3 +731,13 @@ type
if true: # just one space before comment
echo 7
# colors.nim:18
proc `==` *(a, b: Color): bool
## Compares two colors.
##
# colors.nim:18
proc `==` *(a, b: Color): bool {.borrow.}
## Compares two colors.
##

View File

@@ -739,3 +739,13 @@ type
if true: # just one space before comment
echo 7
# colors.nim:18
proc `==` *(a, b: Color): bool
## Compares two colors.
##
# colors.nim:18
proc `==` *(a, b: Color): bool {.borrow.}
## Compares two colors.
##