Skip to content

Commit

Permalink
use regEx
Browse files Browse the repository at this point in the history
  • Loading branch information
RahulGautamSingh authored Dec 2, 2023
1 parent 3c33a26 commit 5355de6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/util/template/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,9 @@ export function proxyCompileInput(input: CompileInput): CompileInput {
return new Proxy<CompileInput>(input, compileInputProxyHandler);
}

const templateRegex =
/{{(?:#(?:if|unless|with|each) )?([a-zA-Z.]+)(?: as \| [a-zA-Z.]+ \|)?}}/g; // TODO #12873
const templateRegex = regEx(
/{{(?:#(?:if|unless|with|each) )?([a-zA-Z.]+)(?: as \| [a-zA-Z.]+ \|)?}}/g,
);

export function compile(
template: string,
Expand Down

0 comments on commit 5355de6

Please sign in to comment.