js-beautify
js-beautify copied to clipboard
Multi-line ternary is not indented if in function call
Input
The code looked like this before beautification:
true
? true
: false;
console.log(
true
? true
: false
);
Expected Output
The code should have looked like this after beautification:
true
? true
: false;
console.log(
true
? true
: false
);
Actual Output
The code actually looked like this after beautification:
true
? true
: false;
console.log(
true
? true
: false
);
Settings
Example:
{
"indent_with_tabs": true,
"indent_size": 4,
"operator_position": "after-newline",
"max_preserve_newlines": 3,
"preserve_newlines": true,
"space_before_conditional": true,
"space_in_empty_paren": false,
"unescape_strings": true,
"wrap_line_length": 0,
"brace_style": "collapse,preserve-inline",
"extra-liners": []
}
Thanks!