JS improve indent (#12581)
* JSgen make indent be all spaces, instead of mixed spaces and tabs, for generated JS
This commit is contained in:
parent
ceda586d88
commit
4c9a7e6f00
2 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue