format everything + support windows now
This commit is contained in:
parent
bae2bac25b
commit
d5b4341487
7 changed files with 27 additions and 25 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue