trying to break the lines at the main operator of a javascript statement
Author: jonnytest1Created Oct 25, 2021Updated Jun 30, 2026
Labelstype: buglanguage: javascript
is this currently possible and im jsut missing the correct flag ?
Input
The code looked like this before beautification:
longerVariableName.test === otherVariable.otherProperty && !reallylongVariableNameExpected Output
The code should have looked like this after beautification: the code should wrap at the highest operator
longerVariableName.test === otherVariable.otherProperty
&& !reallylongVariableNameActual Output
The code actually looked like this after beautification: the code wrapped at the negation
longerVariableName.test === otherVariable.otherProperty && !
reallylongVariableNameSteps to Reproduce
Environment
OS:
Settings
Source: beautifier/js-beautify