Skip to content

Commit

Permalink
fix: 🐛 font format could be without qoutation
Browse files Browse the repository at this point in the history
  • Loading branch information
dews committed Nov 26, 2021
1 parent 6704052 commit 37f04cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/embedResources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getBlobFromURL } from './getBlobFromURL'
import { getMimeType, isDataUrl, makeDataUrl, resolveUrl } from './util'

const URL_REGEX = /url\((['"]?)([^'"]+?)\1\)/g
const URL_WITH_FORMAT_REGEX = /url\([^)]+\)\s*format\((["'])([^"']+)\1\)/g
const URL_WITH_FORMAT_REGEX = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g
const FONT_SRC_REGEX = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g

export function toRegex(url: string): RegExp {
Expand Down

0 comments on commit 37f04cf

Please sign in to comment.