Store scanning information whether JSXText is just an all whitespaces

This commit is contained in:
Kanchalai Tanglertsampan committed 2017-04-11 14:55:26 -07:00
1 parent 17417e9a88
commit 4562fd089c
4 files changed
+12 -5

No files matched your search

+1 -1
View File
@@ -1729,7 +1729,6 @@ namespace ts {
// firstNonWhitespace = 0 to indicate that we want leading whitspace,
while (pos < end) {
pos++;
char = text.charCodeAt(pos);
if (char === CharacterCodes.openBrace) {
break;
@@ -1754,6 +1753,7 @@ namespace ts {
else if (!isWhiteSpaceSingleLine(char)) {
firstNonWhitespace = pos;
}
pos++;
}
return firstNonWhitespace === -1 ? SyntaxKind.JsxTextAllWhiteSpaces : SyntaxKind.JsxText;