fix data url regexp

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent f981bacbd2
commit 1fc66ffcc5
2 changed files with 7 additions and 1 deletions

View File

@@ -63,6 +63,12 @@ describe('absolute url to stylesheet', () => {
expect(
absoluteToStylesheet('url(data:image/gif;base64,ABC)', href),
).to.equal('url(data:image/gif;base64,ABC)');
expect(
absoluteToStylesheet(
'url(data:application/font-woff;base64,d09GMgABAAAAAAm)',
href,
),
).to.equal('url(data:application/font-woff;base64,d09GMgABAAAAAAm)');
});
it('can handle empty path', () => {