diff --git a/src/formatter.litcoffee b/src/formatter.litcoffee index 9e44ad6..3e9f34c 100644 --- a/src/formatter.litcoffee +++ b/src/formatter.litcoffee @@ -34,7 +34,7 @@ We define a set of constants, including: Two-space operators. These operators should have one space both before and after. - TWO_SPACE_OPERATORS = ['=', '+=', '-=', '==', '<=', '>=', + TWO_SPACE_OPERATORS = ['?=", '=', '+=', '-=', '==', '<=', '>=', '>', "<", '+', '-', '*', '/'] One-space operators. They should have one space after. @@ -132,6 +132,7 @@ Another exception: `if (options = arguments[i])?` And also ")," ")." ")[" and "))" shouldn't be separated by space: (thisCharAndNextOne isnt "),") and + (thisCharAndNextOne isnt ")(") and (thisCharAndNextOne isnt ").") and (thisCharAndNextOne isnt ")[") and (thisCharAndNextOne isnt "))") @@ -239,4 +240,4 @@ The following exports are for testing only and should be commented out in produc exports.shortenSpaces = shortenSpaces exports.formatTwoSpaceOperator = formatTwoSpaceOperator exports.notInStringOrComment = notInStringOrComment - exports.formatOneSpaceOperator = formatOneSpaceOperator \ No newline at end of file + exports.formatOneSpaceOperator = formatOneSpaceOperator