Plugin-php: Ugly output `new` node with comment

Created on 3 Apr 2018  路  3Comments  路  Source: prettier/plugin-php

Input:


// Comment
throw new ClassName( // Comment
    1, // Comment
    // Comment
    2 // Comment
); // Comment

/* Comment */
throw new ClassName( /* Comment */
    /* Comment */ 1, /* Comment */
    /* Comment */
    /* Comment */ 2 /* Comment */
    /* Comment */); /* Comment */

Output:

// Comment
throw new ClassName(// Comment
1, // Comment // Comment
2); // Comment // Comment

/* Comment */
throw new ClassName(/* Comment */ /* Comment */
1, /* Comment */ /* Comment */
/* Comment */
2); /* Comment */
/* Comment */ /* Comment */
bug good first issue

All 3 comments

fixed in #319

@mgrip no, we just output comments in throw , it is not fixed :smile:

at least partially dependent on https://github.com/prettier/prettier/issues/4346

Was this page helpful?
0 / 5 - 0 ratings