From bbe01ecd3b0e21afab85a7fb8c5a11995d31baf7 Mon Sep 17 00:00:00 2001 From: atomiks Date: Thu, 28 Dec 2017 06:32:58 +1100 Subject: [PATCH] more fixes --- scripts/lint-script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/lint-script.js b/scripts/lint-script.js index 87b705904..824aa2b49 100644 --- a/scripts/lint-script.js +++ b/scripts/lint-script.js @@ -42,7 +42,7 @@ try { } snippet.code.forEach((str, i) => { - fs.writeFileSync(`${TEMP_PATH}/${snippet.tempNames[i]}.js`, `${snippet.code[i]}`); + fs.writeFileSync(`${TEMP_PATH}/${snippet.tempNames[i]}.js`, str); }); } @@ -62,14 +62,14 @@ try { singleQuote: true }); } catch (e) {} - + lintedCode.push(data); fs.unlink(`${TEMP_PATH}/${tempName}.js`); } // We replace each ```js ``` code block with the newly linted code let index = 0; - snippet.data = snippet.data.replace(codeRE, () => '```js\n' + lintedCode[index++] + '```') + snippet.data = snippet.data.replace(codeRE, () => '```js\n' + lintedCode[index++] + '```'); fs.writeFileSync(path.join(SNIPPETS_PATH, snippet.name), snippet.data); }