Fixes missing space when converting srcset to use absolute URLs (#40)

* Fixes missing space when converting srcset to use absolute URLs

* Fix integration snapshot
This commit is contained in:
Jason Barry
2026-04-01 12:00:00 +08:00
committed by GitHub
parent 1c43577807
commit 949c236e29
2 changed files with 2 additions and 2 deletions

View File

@@ -126,7 +126,7 @@ function getAbsoluteSrcsetString(doc: Document, attributeValue: string) {
}
return '';
})
.join(',');
.join(', ');
return resultingSrcsetString;
}

View File

@@ -229,7 +229,7 @@ exports[`[html file]: with-relative-res.html 1`] = `
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"\\" />
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"http://localhost:3030/a.jpg\\" />
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"http://exmple.com/a.jpg\\" />
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"http://localhost:3030/a.jpg 3x,http://localhost:3030/a.jpg 45x,http://localhost:3030/b.png\\" /></body></html>"
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"http://localhost:3030/a.jpg 3x, http://localhost:3030/a.jpg 45x, http://localhost:3030/b.png\\" /></body></html>"
`;
exports[`[html file]: with-script.html 1`] = `