diff options
author | 2022-09-27 00:54:51 +0530 | |
---|---|---|
committer | 2022-09-26 15:24:51 -0400 | |
commit | b73ec1417117ccc479183fec6efcf06990e5b905 (patch) | |
tree | 8d6dd45179fe4e6eda99c45a0c11c555ba394e21 | |
parent | 6fd00c4941441663247fedbf322ef9bd75108045 (diff) | |
download | astro-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.ts | 2 |
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(); }); |