vscode-json-languageservice
Advanced tools
Comparing version 3.9.0 to 3.9.1
@@ -448,5 +448,6 @@ /*--------------------------------------------------------------------------------------------- | ||
var schemas = []; | ||
var normalizedResource = normalizeResourceForMatching(resource); | ||
for (var _i = 0, _a = this.filePatternAssociations; _i < _a.length; _i++) { | ||
var entry = _a[_i]; | ||
if (entry.matchesPattern(resource)) { | ||
if (entry.matchesPattern(normalizedResource)) { | ||
for (var _b = 0, _c = entry.getURIs(); _b < _c.length; _b++) { | ||
@@ -504,2 +505,11 @@ var schemaId = _c[_b]; | ||
} | ||
function normalizeResourceForMatching(resource) { | ||
// remove querues and fragments, normalize drive capitalization | ||
try { | ||
return URI.parse(resource).with({ fragment: null, query: null }).toString(); | ||
} | ||
catch (e) { | ||
return resource; | ||
} | ||
} | ||
function toDisplayString(url) { | ||
@@ -506,0 +516,0 @@ try { |
@@ -460,5 +460,6 @@ /*--------------------------------------------------------------------------------------------- | ||
var schemas = []; | ||
var normalizedResource = normalizeResourceForMatching(resource); | ||
for (var _i = 0, _a = this.filePatternAssociations; _i < _a.length; _i++) { | ||
var entry = _a[_i]; | ||
if (entry.matchesPattern(resource)) { | ||
if (entry.matchesPattern(normalizedResource)) { | ||
for (var _b = 0, _c = entry.getURIs(); _b < _c.length; _b++) { | ||
@@ -516,2 +517,11 @@ var schemaId = _c[_b]; | ||
} | ||
function normalizeResourceForMatching(resource) { | ||
// remove querues and fragments, normalize drive capitalization | ||
try { | ||
return vscode_uri_1.URI.parse(resource).with({ fragment: null, query: null }).toString(); | ||
} | ||
catch (e) { | ||
return resource; | ||
} | ||
} | ||
function toDisplayString(url) { | ||
@@ -518,0 +528,0 @@ try { |
{ | ||
"name": "vscode-json-languageservice", | ||
"version": "3.9.0", | ||
"version": "3.9.1", | ||
"description": "Language service for JSON", | ||
@@ -5,0 +5,0 @@ "main": "./lib/umd/jsonLanguageService.js", |
476369
9687