Space are suddenly added before parenthesis on switch and catch statements
- Operating System (+Version): Windows 10 Enterprise N 1803 - 17134.285
- VS Code Version: 1.25.1
- beautify Version: 1.4.4
Space is suddenly added before parenthesis after Switch and Catch statements. This was not happening before and our GIT history shows no changes on the .jsbeautifyrc -file. "space_before_conditional" is set to false... At the same time we discovered that mustache-files handled as HTML suddenly begun downwards-staircase-indenting of the complete files... This will be reported in another bug, however this is why we suspect that the updated version of VSCodeBeautify might have something to do with it...
VS Code:
"editor.minimap.enabled": false,
"editor.formatOnSave": true,
.jsbeautifyrc
"js": {
"allowed_file_extensions": [ "js", "json", "jshintrc", "jsbeautifyrc" ],
"brace_style": "collapse",
"break_chained_methods": false,
"e4x": false,
"end_with_newline": true,
"indent_char": "\t",
"indent_level": 0,
"indent_size": 1,
"indent_with_tabs": true,
"jslint_happy": false,
"keep_array_indentation": false,
"keep_function_indentation": false,
"max_preserve_newlines": 4,
"preserve_newlines": true,
"space_after_anon_function": false,
"space_before_conditional": false,
"space_in_empty_paren": false,
"space_in_paren": true,
"unescape_strings": false,
"wrap_line_length": 0
}
Action performed
Format javascript file with space_before_conditional:false command
"space_before_conditional": false,
Expected results
Expected space before parenthesis after switch/catch to be eliminated
if( true ) {
// Corrctly removes space after conditional
}
try{
// Some code
}
catch( e ) {
// Som code
}
switch( value ) {
}
Actual results
if( true ) {
// Correctly removes space after conditional
}
try {
// Some code
}
catch ( e ) {
// Som code
}
switch ( value ) {
}
Duplicate (although exposed differently) of beautify-web/js-beautify#1060