Skip to content

Commit db28bc4

Browse files
authored
Fixes missing space when converting srcset to use absolute URLs (#40)
* Fixes missing space when converting srcset to use absolute URLs * Fix integration snapshot
1 parent f7d43f5 commit db28bc4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/snapshot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ function getAbsoluteSrcsetString(doc: Document, attributeValue: string) {
126126
}
127127
return '';
128128
})
129-
.join(',');
129+
.join(', ');
130130

131131
return resultingSrcsetString;
132132
}

test/__snapshots__/integration.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ exports[`[html file]: with-relative-res.html 1`] = `
229229
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"\\" />
230230
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"http://localhost:3030/a.jpg\\" />
231231
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"http://exmple.com/a.jpg\\" />
232-
<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>"
232+
<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>"
233233
`;
234234

235235
exports[`[html file]: with-script.html 1`] = `

0 commit comments

Comments
 (0)