good first issueimplementation: javascriptimplementation: pythontype: bug
描述
Using http://jsbeautifier.org/, you can replicate the issue seen below. I noted a few things:
- Changing the variable name (e.g., test=["testing"];), the issue is gone
- Removing the semi-colon, the issue is gone
- Keeping the variable name, but assigning an int, the issue is gone
This also happens with the version downloaded from pip this morning on my local machine (Ubuntu 16.04 LTS)
Input
The code looked like this before beautification:
var _0x3e5f=['testing'];
// This is just a sample script. Paste your real code (javascript or HTML) here.
if ('this_is'==/an_example/){of_beautifier();}else{var a=b?(c%d):e[f];}
Expected Output
The code should have looked like this after beautification:
var _0x3e5f = ['testing'];
// This is just a sample script. Paste your real code (javascript or HTML) here.
if ('this_is' == /an_example/) {
of_beautifier();
} else {
var a = b ? (c % d) : e[f];
}
Actual Output
The code actually looked like this after beautification:
// This is just a sample script. Paste your real code (javascript or HTML) here.
if ('this_is' == /an_example/) {
of_beautifier();
} else {
var a = b ? (c % d) : e[f];
}
Steps to Reproduce
Use jsbeautifier.org, paste the code above and see for yourself
Environment
OS: n/a