Skip to content

Commit 988cec5

Browse files
committed
fix: /// <reference path="..." static='true' />
The second quote of the static attribute was incorrectly matched against the first quote of the path attribute.
1 parent c71e596 commit 988cec5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/compiler/precompile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module TypeScript {
4949
return isNoDefaultLibRegex.exec(comment);
5050
}
5151

52-
export var tripleSlashReferenceRegExp = /^(\/\/\/\s*<reference\s+path=)('|")(.+?)\2\s*(static=('|")(.+?)\2\s*)*\/>/;
52+
export var tripleSlashReferenceRegExp = /^(\/\/\/\s*<reference\s+path=)('|")(.+?)\2\s*(static=('|")(.+?)\5\s*)*\/>/;
5353

5454
function getFileReferenceFromReferencePath(fileName: string, text: ISimpleText, position: number, comment: string, diagnostics: Diagnostic[]): IFileReference {
5555
// First, just see if they've written: /// <reference\s+

0 commit comments

Comments
 (0)