diff --git a/lib/parse-font.js b/lib/parse-font.js index ad9fc5aac..a18f05e51 100644 --- a/lib/parse-font.js +++ b/lib/parse-font.js @@ -9,7 +9,7 @@ const styles = 'italic|oblique' const variants = 'small-caps' const stretches = 'ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded' const units = 'px|pt|pc|in|cm|mm|%|em|ex|ch|rem|q' -const string = `'((\\\\'|[^'])+)'|"((\\\\"|[^"])+)"|[\\w\\s-]+` +const string = /'((\\'|[^'])+)'|"((\\"|[^"])+)"|[\w\s-]+/.source // [ [ <‘font-style’> || || <‘font-weight’> || <‘font-stretch’> ]? // <‘font-size’> [ / <‘line-height’> ]? <‘font-family’> ]