From d5136671ceb9f6dfa6a8e3e38a0ea7e8c4997159 Mon Sep 17 00:00:00 2001 From: Ke Xu Date: Thu, 5 Apr 2018 22:03:38 +0900 Subject: [PATCH 1/2] fix problems with applescript color --- manifest.json | 2 +- src/gas-hub.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 9eacbe6..27bdb2a 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "version": "3.3.4", + "version": "3.3.5", "manifest_version": 2, "default_locale": "en", "name": "__MSG_appName__", diff --git a/src/gas-hub.js b/src/gas-hub.js index 6afe45e..ee213b4 100644 --- a/src/gas-hub.js +++ b/src/gas-hub.js @@ -292,7 +292,7 @@ function prepareCode() { if (context.config.manifestEnabled && e.innerText === 'appsscript.json') { hash['appsscript'] = 'appsscript.json'; } - const match = e.innerText.match(/(.*?)\.(gs|html)$/); + const match = e.innerText.trim().match(/(.*?)\.(gs|html)?$/); if (!match || !match[1] || !match[2]) return hash; hash[match[1]] = match[0]; return hash; From b347153e50f67020d9885dd85f024efc0d24f379 Mon Sep 17 00:00:00 2001 From: Ke Xu Date: Thu, 5 Apr 2018 22:08:20 +0900 Subject: [PATCH 2/2] trim all innerText --- src/gas-hub.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gas-hub.js b/src/gas-hub.js index ee213b4..d9eed11 100644 --- a/src/gas-hub.js +++ b/src/gas-hub.js @@ -289,10 +289,10 @@ function prepareCode() { .then((data) => { const re = new RegExp(`\\${context.config.filetype}$`); const files = $('.item').toArray().reduce((hash, e) => { - if (context.config.manifestEnabled && e.innerText === 'appsscript.json') { + if (context.config.manifestEnabled && e.innerText.trim() === 'appsscript.json') { hash['appsscript'] = 'appsscript.json'; } - const match = e.innerText.trim().match(/(.*?)\.(gs|html)?$/); + const match = e.innerText.trim().match(/(.*?)\.(gs|html)$/); if (!match || !match[1] || !match[2]) return hash; hash[match[1]] = match[0]; return hash;