mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
JS improve indent (#12581)
* JSgen make indent be all spaces, instead of mixed spaces and tabs, for generated JS
This commit is contained in:
committed by
Andreas Rumpf
parent
ceda586d88
commit
4c9a7e6f00
@@ -45,7 +45,7 @@
|
||||
|
||||
### Compiler changes
|
||||
|
||||
|
||||
- JS target indent is all spaces, instead of mixed spaces and tabs, for generated JavaScript.
|
||||
|
||||
|
||||
## Bugfixes
|
||||
|
||||
@@ -110,7 +110,7 @@ proc indentLine(p: PProc, r: Rope): Rope =
|
||||
var p = p
|
||||
while true:
|
||||
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:
|
||||
break
|
||||
p = p.up
|
||||
|
||||
Reference in New Issue
Block a user