-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
Nature of issue? Bug
- Found a bug
Details about the bug:
- Web browser and version: Chrome 89.0.4389.82
- Operating System: Windows 10
- Steps to reproduce this bug:
- Create a nested block(branch or loop), inside another branch or loop without using braces anywhere
a)Check this Sample editor file
Here are the contents for ease of access
// Indent Issue
// Create a copy and Tidy Code (Edit -> Tidy Code)
// This is already indented properly
do
if(true)
console.log("foo")
else
console.log("bar")
while(false)
// Same is true for while and for loops:
for(i=0;i<10;i++)
if(true)
console.log("foo")
else
console.log("bar")
while(i<12)
if(true)
i++
else
i--
console.log("foo")
// Note that out put is same in before and after tiding code, "foo" is printed 12 times
- Click on Edit > Tidy Code
a. Expected, this code is already indented properly: if and else lines up. No change should occur
b. Actual: else gets aligned with previous block(while, do or for)
Metadata
Metadata
Assignees
Labels
No labels