JS improve indent (#12581)

* JSgen make indent be all spaces, instead of mixed spaces and tabs, for generated JS
This commit is contained in:
Juan Carlos 2019-11-03 04:03:03 -03:00 • committed by Andreas Rumpf
commit 4c9a7e6f00
2 changed files with 2 additions and 2 deletions

View file

@ -45,7 +45,7 @@
### Compiler changes ### Compiler changes
- JS target indent is all spaces, instead of mixed spaces and tabs, for generated JavaScript.
## Bugfixes ## Bugfixes

View file

@ -110,7 +110,7 @@ proc indentLine(p: PProc, r: Rope): Rope =
var p = p var p = p
while true: while true:
for i in 0 ..< p.blocks.len + p.extraIndent: for i in 0 ..< p.blocks.len + p.extraIndent:
prepend(result, "\t".rope) prepend(result, rope" ")
if p.up == nil or p.up.prc != p.prc.owner: if p.up == nil or p.up.prc != p.prc.owner:
break break
p = p.up p = p.up