File tree Expand file tree Collapse file tree 2 files changed +0
-20
lines changed Expand file tree Collapse file tree 2 files changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -664,9 +664,6 @@ namespace ts {
664664 let collecting = trailing ;
665665 let accumulator = initial ;
666666 if ( pos === 0 ) {
667- if ( collecting ) {
668- return accumulator ;
669- }
670667 collecting = true ;
671668 const shebang = getShebang ( text ) ;
672669 if ( shebang ) {
Original file line number Diff line number Diff line change @@ -28,22 +28,5 @@ namespace ts {
2828 assert . strictEqual ( result ! . length , 1 ) ;
2929 assert . strictEqual ( result ! [ 0 ] . kind , SyntaxKind . SingleLineCommentTrivia ) ;
3030 } ) ;
31-
32- it ( "returns no trailing comments at start of file" , ( ) => {
33- const result = getTrailingCommentRanges ( noShebang , 0 ) ;
34- assert . isUndefined ( result ) ;
35- } ) ;
36-
37- it ( "returns no trailing comments at start of file if shebang is present" , ( ) => {
38- const result = getTrailingCommentRanges ( withShebang , 0 ) ;
39- assert . isUndefined ( result ) ;
40- } ) ;
41-
42- it ( "returns trailing comments if position is not 0" , ( ) => {
43- const result = getTrailingCommentRanges ( withTrailing , 1 ) ;
44- assert . isDefined ( result ) ;
45- assert . strictEqual ( result ! . length , 1 ) ;
46- assert . strictEqual ( result ! [ 0 ] . kind , SyntaxKind . MultiLineCommentTrivia ) ;
47- } ) ;
4831 } ) ;
4932}
You can’t perform that action at this time.
0 commit comments