Skip to content

Commit 2a96149

Browse files
authored
fix: 🐛 font format could be without qoutation (#217)
1 parent a608fd0 commit 2a96149

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/embedResources.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { getBlobFromURL } from './getBlobFromURL'
33
import { getMimeType, isDataUrl, makeDataUrl, resolveUrl } from './util'
44

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

99
export function toRegex(url: string): RegExp {

0 commit comments

Comments
 (0)