Skip to content

Commit

Permalink
Splicfile
Browse files Browse the repository at this point in the history
  • Loading branch information
rachfop committed May 16, 2024
1 parent 516035b commit b2a287b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
/<!--SNIPFILE (https:\/\/github\.com\/([^\/]+)\/([^\/]+)\/blob\/([^\/]+)\/([^ ]+)) -->/
Expand Down Expand Up @@ -512,6 +513,7 @@ class Sync {
}
return dynamicFile;
}


// spliceFile inserts the snippets into the file
async spliceFile(start, end, snippet, file, config) {
Expand Down

0 comments on commit b2a287b

Please sign in to comment.