Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix missing inner comments in class expressions (#13821)
- Loading branch information
1 parent
7acc68a
commit 58a65e9
Showing
4 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/babel-generator/test/fixtures/comments/class-comments/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const A = class /* before body */ { /* inside body */ }; | ||
const B = class /* before name */ X /* before body */ { /* inside body */ }; | ||
const C = class /* before extends */ extends /* after extends */ X /* before body */ {/* inside body */}; | ||
const D = class /* before name */ X /* before extends */ extends /* after extends */ X /* before body */ {/* inside body */}; | ||
|
||
class /* before name */ E /* before body */ { /* inside body */ } | ||
class /* before name */ F /* before extends */ extends /* after extends */ X /* before body */ {/* inside body */} |
3 changes: 3 additions & 0 deletions
3
packages/babel-generator/test/fixtures/comments/class-comments/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"retainLines": true | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/babel-generator/test/fixtures/comments/class-comments/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const A = class /* before body */{/* inside body */}; | ||
const B = class /* before name */X /* before body */ {/* inside body */}; | ||
const C = class /* before extends */ extends /* after extends */X /* before body */ {/* inside body */}; | ||
const D = class /* before name */X /* before extends */ extends /* after extends */X /* before body */ {/* inside body */}; | ||
|
||
class /* before name */E /* before body */ {/* inside body */} | ||
class /* before name */F /* before extends */ extends /* after extends */X /* before body */ {/* inside body */} |