mirror of
https://github.com/panosoft/inline-html
synced 2026-01-13 13:04:30 -08:00
Fix bug where assets with a space in their path could not be bundled.
This commit is contained in:
1
test/fixtures/file space.txt
vendored
Normal file
1
test/fixtures/file space.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Test.
|
||||
@@ -159,5 +159,10 @@ describe('inlineHtml', function () {
|
||||
var html = (source) => `<style> div { background-image: url('${source}'); }</style>`;
|
||||
return expect(inline(html(url))).to.eventually.equal(html(uri));
|
||||
});
|
||||
|
||||
it('handle assets with a space in their filename', function () {
|
||||
var filename = path.resolve(__dirname, 'fixtures/file space.txt');
|
||||
var uri = datauri(filename);
|
||||
var html = (source) => `<style> div { background-image: url('${source}'); }</style>`;
|
||||
return expect(inline(html(filename))).to.eventually.equal(html(uri));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user