Merge pull request #4375 from basarat/fix/shebang-trivia-scan
fix(scanner) try a trivia scan only if pos === 0
This commit is contained in:
commit
229c470025
|
@ -472,7 +472,7 @@ namespace ts {
|
|||
break;
|
||||
|
||||
case CharacterCodes.hash:
|
||||
if (isShebangTrivia(text, pos)) {
|
||||
if (pos === 0 && isShebangTrivia(text, pos)) {
|
||||
pos = scanShebangTrivia(text, pos);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue