summaryrefslogtreecommitdiff
path: root/packages/integrations/markdoc/src/html/css/parse-inline-styles.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/integrations/markdoc/src/html/css/parse-inline-styles.ts')
-rw-r--r--packages/integrations/markdoc/src/html/css/parse-inline-styles.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/integrations/markdoc/src/html/css/parse-inline-styles.ts b/packages/integrations/markdoc/src/html/css/parse-inline-styles.ts
index 623b560af..fa3217c89 100644
--- a/packages/integrations/markdoc/src/html/css/parse-inline-styles.ts
+++ b/packages/integrations/markdoc/src/html/css/parse-inline-styles.ts
@@ -23,9 +23,11 @@ const NEWLINE_REGEX = /\n/g;
const WHITESPACE_REGEX = /^\s*/;
// declaration
-const PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;
+const PROPERTY_REGEX = /^([-#/*\\\w]+(\[[\da-z_-]+\])?)\s*/;
const COLON_REGEX = /^:\s*/;
-const VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;
+// Disable eslint as we're not sure how to improve this regex yet
+// eslint-disable-next-line regexp/no-super-linear-backtracking
+const VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*\)|[^};])+)/;
const SEMICOLON_REGEX = /^[;\s]*/;
// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill