fix data url regexp

This commit is contained in:
Yanzhen Yu
2019-08-31 16:13:02 +08:00
parent 32f14b3027
commit a69791b7f5
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', () => {