1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-08-30 01:00:11 +02:00

highlighting merged document results

This commit is contained in:
Thomas Wilkerling
2025-05-14 08:28:38 +02:00
parent 9053b2c834
commit 4a59a9a027
128 changed files with 3601 additions and 8090 deletions

View File

@@ -26,6 +26,14 @@ fs.existsSync("dist") || fs.mkdirSync("dist");
`: (0,eval)('import("worker_threads").then(function(worker){return new worker["Worker"]((1,eval)(\\"import.meta.dirname\\")+"/worker/node.mjs")})')`
);
}
let tmp;
while(tmp !== src){
tmp = src;
// remove comments, keep annotations
src = src.replace(/[^:]\/\/(.*)(\r\n|\r|\n|$)/g, "$2");
src = src.replace(/^\/\/(.*)(\r\n|\r|\n|$)/g, "$2");
src = src.replace(/\/\*[^*](.*)\*\//g, "");
}
fs.writeFileSync("tmp/" + file, src);
}
});
@@ -65,6 +73,14 @@ fs.existsSync("dist") || fs.mkdirSync("dist");
// add the eval wrapper
src = src.replace('options=(await import(filepath))["default"];', '//options=(await import(filepath))["default"];');
}
let tmp;
while(tmp !== src){
tmp = src;
// remove comments, keep annotations
src = src.replace(/[^:]\/\/(.*)(\r\n|\r|\n|$)/g, "$2");
src = src.replace(/^\/\/(.*)(\r\n|\r|\n|$)/g, "$2");
src = src.replace(/\/\*[^*](.*)\*\//g, "");
}
fs.writeFileSync("tmp/" + path + "/" + file, src);
}
});