js-beautify
js-beautify copied to clipboard
issue prettifying (function(){code();{code}})()
Description
the code does not look pretty after "prettifying"
Input
The code looked like this before beautification:
(function() {
some_code_here();
{
/* IE11 let bug bypass */
let index;
for (index in a) {
a[index];
}
}
})();
Current Output
The code actually looked like this after beautification:
(function() {
some_code_here(); {
/* IE11 let bug bypass */
let index;
for (index in a) {
a[index];
}
}
})();
Expected Output
The code should have looked something like this after beautification:
(function() {
some_code_here();
{
/* IE11 let bug bypass */
let index;
for (index in a) {
a[index];
}
}
})();
Environment
Browser User Agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
Language Selected: Beautify JavaScript
Settings
(just the default)
{
"indent_size": "4",
"indent_char": " ",
"max_preserve_newlines": "5",
"preserve_newlines": true,
"keep_array_indentation": false,
"break_chained_methods": false,
"indent_scripts": "normal",
"brace_style": "collapse",
"space_before_conditional": true,
"unescape_strings": false,
"jslint_happy": false,
"end_with_newline": false,
"wrap_line_length": "0",
"indent_inner_html": false,
"comma_first": false,
"e4x": false,
"indent_empty_lines": false
}