Skip to content

Commit

Permalink
Fixes extra space error for )( and ?=
Browse files Browse the repository at this point in the history
  • Loading branch information
hsingh23 committed Nov 9, 2014
1 parent c330f8e commit 065cba0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/formatter.litcoffee
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 "))")
Expand Down Expand Up @@ -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
exports.formatOneSpaceOperator = formatOneSpaceOperator

0 comments on commit 065cba0

Please sign in to comment.