Merge pull request #427 from sparecycles/fix/reference-static-regex

fix: /// <reference path="..." static='true' />
This commit is contained in:
Mohamed Hegazy
2014-08-12 17:46:06 -07:00
6 changed files with 46 additions and 1 deletions

View File

@@ -49,7 +49,7 @@ module TypeScript {
return isNoDefaultLibRegex.exec(comment);
}
export var tripleSlashReferenceRegExp = /^(\/\/\/\s*<reference\s+path=)('|")(.+?)\2\s*(static=('|")(.+?)\2\s*)*\/>/;
export var tripleSlashReferenceRegExp = /^(\/\/\/\s*<reference\s+path=)('|")(.+?)\2\s*(static=('|")(.+?)\5\s*)*\/>/;
function getFileReferenceFromReferencePath(fileName: string, text: ISimpleText, position: number, comment: string, diagnostics: Diagnostic[]): IFileReference {
// First, just see if they've written: /// <reference\s+