Поправлен баг

This commit is contained in:
Book Pauk
2020-12-16 16:09:35 +07:00
parent 007e97463b
commit 32b8382641
2 changed files with 15 additions and 8 deletions

View File

@@ -204,7 +204,7 @@ export default class BookParser {
let attrs = sax.getAttrsSync(tail);
if (attrs.href && attrs.href.value) {
const href = attrs.href.value;
const {id} = this.imageHrefToId(href);
const {id, local} = this.imageHrefToId(href);
if (href[0] == '#') {//local
imageNum++;
@@ -213,7 +213,7 @@ export default class BookParser {
else
newParagraph(`<image href="${href}" num="${imageNum}">${' '.repeat(maxImageLineCount)}</image>`, maxImageLineCount);
this.images.push({paraIndex, num: imageNum, id});
this.images.push({paraIndex, num: imageNum, id, local});
if (inPara && this.showInlineImagesInCenter)
newParagraph(' ', 1);
@@ -223,7 +223,7 @@ export default class BookParser {
dimPromises.push(getExternalImageDimensions(href));
newParagraph(`<image href="${href}" num="${imageNum}">${' '.repeat(maxImageLineCount)}</image>`, maxImageLineCount);
this.images.push({paraIndex, num: imageNum, id});
this.images.push({paraIndex, num: imageNum, id, local});
}
}
}