Skip to content

Commit

Permalink
Merge branch 'main' into feat/integration-example
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Sullivan committed Sep 26, 2022
2 parents 03e6938 + b73ec14 commit aa8f536
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/astro/src/runtime/server/render/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down

0 comments on commit aa8f536

Please sign in to comment.