Commit Graph

2 Commits (b861448dbf4f5fac83ac9555adf87989f03ee3a5)

Author SHA1 Message Date
Christopher Chedeau ea957ed64a Fix function trailing comment location (#1195)
It turns out that we can't reliably detect with the ast if a comment is before or after the ). In order to fix this same problem with `if` I added the `getNextNonSpaceNonCommentCharacter` function. We can use the same here to fix the problem.

Fixes #933
2017-04-12 14:18:29 -07:00
Christopher Chedeau 1a8e97f92b Fix trailing commas with a trailing comment (#664)
The reason why trailing comments on a line work with commas is because of a special `lineSuffix` document that delays printing the content until a \n is printed. But `lineSuffix` only worked for pure string. By making it work with arbitrary documents we can fix trailing commas with trailing comments.

Fixes #538
2017-02-13 10:13:16 -05:00