Commit Graph

4 Commits (0b07e1083339e28a8239df3f5245f530cc4fd7f8)

Author SHA1 Message Date
Felix Wu 8779937a07 Bugfix/ Leave Dangle Comments in NewExpression (#5017)
```js
new Thing(/* comment */)
```

now stays the same instead of being formatted into

```js
new Thing /* comment */()
```
2018-08-27 09:23:14 +08:00
Davy Duperron 1affecc1a0 Fix missing dangling comment in exports (#741)
* Add missing dangling comment injection.

* Update tests.

* Add code comment.
2017-02-19 14:39:09 -08:00
Amjad Masad 57c8c99e7b Fix syntax error in empty object with dangling comment (#533) 2017-01-31 06:52:05 -08:00
Christopher Chedeau 32059f6914 Proper support for dangling comments (#492)
* Proper support for dangling comments

In one code path, the dangling comment case is not properly handled. So I added the dangling comment, but it turns out that we only print manually in two node types: Program and BlockStatement. I made the generic printComment function print it everywhere but those two nodes. I tried to get rid of those special cases but unfortunately we need them there otherwise they are not printed at the right place.

Fixes #20

* Output dangling comments in specific places
2017-01-27 16:09:15 -05:00