Skip to content

Commit

Permalink
Use regexp syntax for "string"
Browse files Browse the repository at this point in the history
Co-authored-by: Caleb Hearon <[email protected]>
  • Loading branch information
virtulis and chearon authored Jul 9, 2024
1 parent dc41182 commit c17e199
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/parse-font.js
Original file line number Diff line number Diff line change
Expand Up @@ -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-variant-css21> || <‘font-weight’> || <‘font-stretch’> ]?
// <‘font-size’> [ / <‘line-height’> ]? <‘font-family’> ]
Expand Down

0 comments on commit c17e199

Please sign in to comment.