From b2a287bebb40cc0df60beb3b31513c220a830e08 Mon Sep 17 00:00:00 2001 From: rachfop Date: Thu, 16 May 2024 11:12:25 -0700 Subject: [PATCH] Splicfile --- src/Sync.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Sync.js b/src/Sync.js index fc08fec..b447b00 100644 --- a/src/Sync.js +++ b/src/Sync.js @@ -460,8 +460,9 @@ class Sync { let config; for (let [idx, _] of staticFile.lines.entries()) { const line = file.lines[idx]; + let extracted = extractWriteIDAndConfig(line); if (line.includes(writeStart) || line.includes(snipFileStart)) { - const extracted = extractWriteIDAndConfig(line); + extracted = extractWriteIDAndConfig(line); if (extracted.id === null) { const snipMatch = line.match( // @@ -512,6 +513,7 @@ class Sync { } return dynamicFile; } + // spliceFile inserts the snippets into the file async spliceFile(start, end, snippet, file, config) {