From 538f033f0d453d17f0ded0e263bd831593bf12db Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 2 Dec 2014 13:56:02 -0800 Subject: [PATCH] Moved position increment in scanner; removed confusing comment. --- src/compiler/scanner.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index fcb8c9b0c31..b1766388e14 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -631,14 +631,14 @@ module ts { // Speculated ECMAScript 6 Spec 11.8.6.1: // and LineTerminatorSequences are normalized to for Template Values - // An explicit EscapeSequence is needed to include a or sequence. if (currChar === CharacterCodes.carriageReturn) { contents += text.substring(start, pos); + pos++; - if (pos + 1 < len && text.charCodeAt(pos + 1) === CharacterCodes.lineFeed) { + if (pos < len && text.charCodeAt(pos) === CharacterCodes.lineFeed) { pos++; } - pos++; + contents += "\n"; start = pos; continue;