Skip to content

Commit

Permalink
🐛 Fix invalid item in epub check
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Feb 23, 2024
1 parent 945e929 commit 2492a35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion utils/epub/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const ISCN_XHTML = `<?xml version="1.0" encoding="utf-8"?>
<div id="iscn-page-body">
<div id="iscn-page-book-info" />
<div id="iscn-qr-code">
<img src="iscn-qr-code.png" width="180px" height="180px" />
<img src="iscn-qr-code.png" width="180" height="180" />
<br />
<a id="iscn-prefix" />
</div>
Expand Down
3 changes: 3 additions & 0 deletions utils/epub/iscn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ export async function injectISCNQRCodePage(buffer: ArrayBuffer, book: Book, iscn
const updatedISCNXHTMLString = new XMLSerializer().serializeToString(iscnXHTMLDoc).toString()

await zipObject.file(iscnXHTMLPath, updatedISCNXHTMLString)
await zipObject.file('mimetype', 'application/epub+zip', {
compression: 'STORE',
});
const epubBlob = await zipObject.generateAsync({
mimeType: 'application/epub+zip',
type: 'blob',
Expand Down

0 comments on commit 2492a35

Please sign in to comment.