nimpretty: yet another improvement

This commit is contained in:
Araq 2019-07-09 10:08:23 +02:00
commit 0193c8ad2e
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) = proc emitMultilineComment(em: var Emitter, lit: string, col: int) =
# re-align every line in the multi-line comment: # re-align every line in the multi-line comment:
var i = 0 var i = 0
var lastIndent = em.indentStack[^1] var lastIndent = if em.keepIndents > 0: em.indentLevel else: em.indentStack[^1]
var b = 0 var b = 0
var dontIndent = false var dontIndent = false
for commentLine in splitLines(lit): for commentLine in splitLines(lit):

View file

@ -731,3 +731,13 @@ type
if true: # just one space before comment if true: # just one space before comment
echo 7 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 if true: # just one space before comment
echo 7 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.
##