[json] fix for contributed schemas located inside extensions

This commit is contained in:
Martin Aeschlimann 2016-01-26 09:48:45 +01:00
parent 63bbc4ea27
commit 9443432459

View file

@ -90,8 +90,8 @@ function getSchemaAssociation(context: ExtensionContext) : ISchemaAssociations {
jsonValidation.forEach(jv => {
var {fileMatch, url} = jv;
if (fileMatch && url) {
if (url[0] === '.' && url[1] === '.') {
url = context.asAbsolutePath(url);
if (url[0] === '.' && url[1] === '/') {
url = path.join(extension.extensionPath, url);
}
if (fileMatch[0] === '%') {
fileMatch = fileMatch.replace(/%APP_SETTINGS_HOME%/, '/User');