Minor changes

This commit is contained in:
lowlighter
2020-10-18 12:42:59 +02:00
parent 18f3c2ee74
commit 833e730edc
3 changed files with 6 additions and 5 deletions

View File

@@ -19,7 +19,7 @@
//Perform static includes
for (const match of [...code.match(/(?<=`)<#include (.+?)>(?=`)/g)]) {
const file = match.match(/<#include (.+?)>/)[1]
code = code.replace(`<#include ${file}>`, `${await fs.promises.readFile(path.join(__dirname, "..", "src", file))}`.replace(/([$`])/g, "\\$1"))
code = code.replace(`<#include ${file}>`, `${await fs.promises.readFile(path.join(__dirname, "..", "src", file))}`.replace(/([$`\\])/g, "\\$1"))
console.log(`Included ${file}`)
}