summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Rishi Raj Jain <rishi18304@iiitd.ac.in> 2022-09-27 00:54:51 +0530
committerGravatar GitHub <noreply@github.com> 2022-09-26 15:24:51 -0400
commitb73ec1417117ccc479183fec6efcf06990e5b905 (patch)
tree8d6dd45179fe4e6eda99c45a0c11c555ba394e21
parent6fd00c4941441663247fedbf322ef9bd75108045 (diff)
downloadastro-b73ec1417117ccc479183fec6efcf06990e5b905.tar.gz
astro-b73ec1417117ccc479183fec6efcf06990e5b905.tar.zst
astro-b73ec1417117ccc479183fec6efcf06990e5b905.zip
Change negative lookbehind to lookahead (#4866)
-rw-r--r--packages/astro/src/runtime/server/render/util.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/astro/src/runtime/server/render/util.ts b/packages/astro/src/runtime/server/render/util.ts
index f98d44456..31a6bf21a 100644
--- a/packages/astro/src/runtime/server/render/util.ts
+++ b/packages/astro/src/runtime/server/render/util.ts
@@ -15,7 +15,7 @@ const STATIC_DIRECTIVES = new Set(['set:html', 'set:text']);
// converts (most) arbitrary strings to valid JS identifiers
const toIdent = (k: string) =>
- k.trim().replace(/(?:(?<!^)\b\w|\s+|[^\w]+)/g, (match, index) => {
+ k.trim().replace(/(?:(?!^)\b\w|\s+|[^\w]+)/g, (match, index) => {
if (/[^\w]|\s/.test(match)) return '';
return index === 0 ? match : match.toUpperCase();
});