diff --git a/functions.js b/functions.js index 4118a8b..611c460 100644 --- a/functions.js +++ b/functions.js @@ -132,7 +132,7 @@ const pushToGhost = async (postSlug) => { const outStream = fs.createWriteStream(postOutput, { encoding: 'utf-8' }) - let titleSkipped = false; + var titleSkipped = false; let reImage = new RegExp('^!\\[(.*)\\]\\((\\S+?)\\)(.*)') let reTitle = new RegExp('^#\ .*') @@ -144,7 +144,9 @@ const pushToGhost = async (postSlug) => { var newLine = line // Skip the header - if (!titleSkipped && await reTitle.exec(line)) return + if (!titleSkipped && await reTitle.exec(line)) { + titleSkipped = true + } // check for images var m = await reImage.exec(line)