fix(ecma): indent single-line if statements (#6846)

Fixes #5898.
This commit is contained in:
Riley Bruins 2024-07-03 19:13:16 -07:00 committed by GitHub
parent caf275382f
commit fa611f612a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 4 deletions

View file

@ -11,3 +11,9 @@ if (cond1) {
} else {
do_fallback()
}
if (true)
console.log('hi')
console.log('hi')
if (true)

View file

@ -75,6 +75,8 @@ describe("indent JavaScript:", function()
{ 9, 2 },
{ 12, 2 },
{ 13, 0 },
{ 16, 0 },
{ 19, 2 },
} do
run:new_line("ecma/if_else.js", { on_line = info[1], text = "hello()", indent = info[2] }, info[3], info[4])
end