From 5f69f3a2f4a3fe06b8c6852d85917ded1dfb5796 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Fri, 10 Jan 2025 10:28:54 -0700 Subject: [PATCH] Changed code that computes unescaped literal string type to convert CRLF to LF within multi-line triple-quoted strings so the behavior is consistent with runtime. This addresses #9681. --- packages/pyright-internal/src/parser/stringTokenUtils.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/pyright-internal/src/parser/stringTokenUtils.ts b/packages/pyright-internal/src/parser/stringTokenUtils.ts index c53dda0dd96b..3cbbc783e07e 100644 --- a/packages/pyright-internal/src/parser/stringTokenUtils.ts +++ b/packages/pyright-internal/src/parser/stringTokenUtils.ts @@ -305,7 +305,6 @@ export function getUnescapedString(stringToken: StringToken | FStringMiddleToken } else if (curChar === Char.LineFeed || curChar === Char.CarriageReturn) { // Skip over the escaped new line (either one or two characters). if (curChar === Char.CarriageReturn && getEscapedCharacter(1) === Char.LineFeed) { - appendOutputChar(curChar); strOffset++; curChar = getEscapedCharacter(); }