Commit Graph

3 Commits (0b07e1083339e28a8239df3f5245f530cc4fd7f8)

Author SHA1 Message Date
jackyho112 302de60bdc Fix comment style when placed after if statement test (#2675)
* Fix comment style when placed after the test of an if statement

* Add tests

* Do a bit of refactoring

* Fix lint errors

* Handle skipping comments

* Account for multiple-line comments

* Add more tests

* Change function name

* Add more tests

* Refactor

* Add some comments

* Do away with getPreviousNonSpaceNonCommentCharacter

* Improve comment and code on handling if statement comments

* Refactor

* Fix a bug
2017-09-08 10:12:10 -07:00
Christopher Chedeau 6552257ab0 Stabilize else comments (#1177)
In #544, I fixed it for all the cases but didn't check for else :(

Fixes #1161
2017-04-10 10:46:44 -07:00
Christopher Chedeau e56fd38604 Make comments between if & else to look good (#544)
While trying to figure out how to handle both MemberExpression comments and IfStatement comments, I ended up doing this one as well... Sorry @yamafaktory :(

The logic is a bit annoying but works.

Fixes #487
2017-02-01 16:23:49 -08:00