diff --git a/lib/static.js b/lib/static.js index d4b1506..e866b53 100644 --- a/lib/static.js +++ b/lib/static.js @@ -65,11 +65,11 @@ const copyAssetsAndWriteFile = async (sourceDir, file, targetDir) => { let image; const html = md.marked(markdown.toString()); - while (image = htmlImageRE.exec(html)) { + while ((image = htmlImageRE.exec(html))) { const [, imgPath] = image; if (!isAbsoluteURL(imgPath)) { const relPath = path.join(path.dirname(file), imgPath); - awaits.push(cp(path.join(sourceDir, relPath), path.join(targetDir, relPath)).catch((err) => console.warn(err))); + awaits.push(cp(path.join(sourceDir, relPath), path.join(targetDir, relPath)).catch(err => console.warn(err))); } }