mirror of
https://github.com/beautifier/js-beautify.git
synced 2024-11-30 16:10:31 +00:00
Fix minor array indenting issue
This commit is contained in:
parent
1d912103a5
commit
daa5e3e183
@ -305,5 +305,7 @@ function run_beautifier_tests(test_obj)
|
||||
bt("a = ['a','b','c']", "a = ['a', 'b', 'c']");
|
||||
bt("a = ['a', 'b','c']", "a = ['a', 'b', 'c']");
|
||||
|
||||
bt('{a([[a1]], {b;});}', '{\n a([[a1]], {\n b;\n });\n}');
|
||||
|
||||
return sanitytest;
|
||||
}
|
||||
|
@ -656,7 +656,9 @@ function js_beautify(js_source_text, options) {
|
||||
case 'TK_END_EXPR':
|
||||
if (token_text === ']') {
|
||||
if (flags.mode === '[INDENTED-EXPRESSION]') {
|
||||
unindent();
|
||||
if (!opt_keep_array_indentation) {
|
||||
unindent();
|
||||
}
|
||||
if (last_text === ']') {
|
||||
print_newline();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user