From ebbbbcbf571255494bcd4e99a65766cab30a2117 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Sat, 23 Dec 2017 23:43:37 +0100 Subject: [PATCH] Added file path space trimming Added file path space trimming to avoid copy paste fails. Example: https://github.com/Microsoft/vscode/issues/40760 --- generators/app/grammarConverter.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/generators/app/grammarConverter.js b/generators/app/grammarConverter.js index 8a711cd6..2e7118ca 100644 --- a/generators/app/grammarConverter.js +++ b/generators/app/grammarConverter.js @@ -43,6 +43,8 @@ function convertGrammar(location, extensionConfig) { } else { // load from disk var body = null; + // trim the spaces of the location path + location = location.trim() try { body = fs.readFileSync(location); } catch (error) { @@ -107,4 +109,4 @@ function processContent(extensionConfig, fileName, body) { extensionConfig.languageContent = body; }; -exports.convertGrammar = convertGrammar; \ No newline at end of file +exports.convertGrammar = convertGrammar;