summaryrefslogtreecommitdiff
path: root/packages/integrations/markdoc/src/html/css/parse-inline-css-to-react.ts
diff options
context:
space:
mode:
authorGravatar Bjorn Lu <bjornlu.dev@gmail.com> 2024-02-07 20:43:19 +0800
committerGravatar GitHub <noreply@github.com> 2024-02-07 20:43:19 +0800
commit436841e97e0ecbf6e5e1658b2c1e272d7856cdc9 (patch)
treea8e1744f8fa4ce06420d72381a3659251e0ea9ae /packages/integrations/markdoc/src/html/css/parse-inline-css-to-react.ts
parentce4283331f18c6178654dd705e3cf02efeef004a (diff)
downloadastro-436841e97e0ecbf6e5e1658b2c1e272d7856cdc9.tar.gz
astro-436841e97e0ecbf6e5e1658b2c1e272d7856cdc9.tar.zst
astro-436841e97e0ecbf6e5e1658b2c1e272d7856cdc9.zip
Use eslint-plugin-regexp (#9993)
Diffstat (limited to 'packages/integrations/markdoc/src/html/css/parse-inline-css-to-react.ts')
-rw-r--r--packages/integrations/markdoc/src/html/css/parse-inline-css-to-react.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/integrations/markdoc/src/html/css/parse-inline-css-to-react.ts b/packages/integrations/markdoc/src/html/css/parse-inline-css-to-react.ts
index dd429788a..2e445d35f 100644
--- a/packages/integrations/markdoc/src/html/css/parse-inline-css-to-react.ts
+++ b/packages/integrations/markdoc/src/html/css/parse-inline-css-to-react.ts
@@ -17,7 +17,7 @@ export function parseInlineCSSToReactLikeObject(
function convertCssDirectiveNameToReactCamelCase(original: string): string {
// capture group 1 is the character to capitalize, the hyphen is omitted by virtue of being outside the capture group
- const replaced = original.replace(/-([a-z0-9])/gi, (_match, char) => {
+ const replaced = original.replace(/-([a-z\d])/gi, (_match, char) => {
return char.toUpperCase();
});
return replaced;