format everything + support windows now

This commit is contained in:
Soph :3 2025-10-19 02:22:26 +03:00
parent bae2bac25b
commit d5b4341487
7 changed files with 27 additions and 25 deletions

View file

@ -5,13 +5,13 @@ export default class CompileTimeJS extends Plugin {
rewriteTriggers = ["html", "*"]
longLasting = false;
build = undefined;
async rewriteFile(file: string, filePath: string): Promise<string> {
let input = file;
const regex = /{&(.+)&}/gms;
let m;
while ((m = regex.exec(file)) !== null) {
if (m.index === regex.lastIndex) {
regex.lastIndex++;
@ -22,4 +22,4 @@ export default class CompileTimeJS extends Plugin {
return input;
}
}
}