[bugfix] nimpretty indents multiline comments correctly (#11607)

This commit is contained in:
Miran 2019-07-02 10:52:46 +02:00 • committed by Andreas Rumpf
commit c522a455df
3 changed files with 42 additions and 0 deletions

View file

@ -145,6 +145,10 @@ proc closeEmitter*(em: var Emitter) =
maxLhs = 0
lineBegin = i+1
of ltTab:
if i >= 2 and em.kinds[i-2] == ltNewline and em.kinds[i-1] in {ltNewline, ltSpaces}:
# a previous section has ended
maxLhs = 0
if maxLhs == 0:
content.add em.tokens[i]
inc lineLen, em.tokens[i].len