File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -8698,12 +8698,12 @@ namespace Parser {
8698
8698
8699
8699
function removeTrailingWhitespace(comments: string[]) {
8700
8700
while (comments.length) {
8701
- const trimmed = trimString (comments[comments.length - 1]);
8701
+ const trimmed = trimStringEnd (comments[comments.length - 1]);
8702
8702
if (trimmed === "") {
8703
8703
comments.pop();
8704
8704
}
8705
8705
else if (trimmed.length < comments[comments.length - 1].length) {
8706
- comments[comments.length - 1] = trimStringEnd(comments[comments.length - 1]) ;
8706
+ comments[comments.length - 1] = trimmed ;
8707
8707
break;
8708
8708
}
8709
8709
else {
Original file line number Diff line number Diff line change @@ -2465,16 +2465,16 @@ export function createScanner(languageVersion: ScriptTarget,
2465
2465
if ( pos >= end ) {
2466
2466
return token = SyntaxKind . EndOfFileToken ;
2467
2467
}
2468
- for ( let ch = codePointAt ( text , pos ) ;
2469
- pos < end && ( ch !== CharacterCodes . lineFeed && ch !== CharacterCodes . carriageReturn && ch !== CharacterCodes . backtick ) ;
2470
- ch = codePointAt ( text , pos += charSize ( ch ) ) ) {
2468
+ for ( let ch = text . charCodeAt ( pos ) ;
2469
+ pos < end && ( ! isLineBreak ( ch ) && ch !== CharacterCodes . backtick ) ;
2470
+ ch = codePointAt ( text , ++ pos ) ) {
2471
2471
if ( ! inBackticks ) {
2472
2472
if ( ch === CharacterCodes . openBrace ) {
2473
2473
break ;
2474
2474
}
2475
2475
else if ( ch === CharacterCodes . at
2476
- && pos - 1 >= 0 && isWhiteSpaceSingleLine ( codePointAt ( text , pos - 1 ) )
2477
- && ! ( pos + 1 < end && isWhiteSpaceLike ( codePointAt ( text , pos + 1 ) ) ) ) {
2476
+ && pos - 1 >= 0 && isWhiteSpaceSingleLine ( text . charCodeAt ( pos - 1 ) )
2477
+ && ! ( pos + 1 < end && isWhiteSpaceLike ( text . charCodeAt ( pos + 1 ) ) ) ) {
2478
2478
// @ doesn't start a new tag inside ``, and elsewhere, only after whitespace and before non-whitespace
2479
2479
break ;
2480
2480
}
You can’t perform that action at this time.
0 commit comments