Fix html export not including images (#9260)

* Fix html export not including images

* Respect showPlaceholder

* Add tests
This commit is contained in:
Michael Telatynski 2022-09-08 11:00:58 +01:00 committed by GitHub
parent 638175b7d7
commit 52fc8ff255
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 68 additions and 23 deletions

View file

@ -316,7 +316,7 @@ export default class HTMLExporter extends Exporter {
}
if (filePath) {
const mxc = mxEv.getContent().url || mxEv.getContent().file?.url;
const mxc = mxEv.getContent().url ?? mxEv.getContent().file?.url;
eventTileMarkup = eventTileMarkup.split(mxc).join(filePath);
}
eventTileMarkup = eventTileMarkup.replace(/<span class="mx_MFileBody_info_icon".*?>.*?<\/span>/, '');
@ -382,7 +382,9 @@ export default class HTMLExporter extends Exporter {
joined,
);
}
} else eventTile = await this.getEventTileMarkup(mxEv, joined);
} else {
eventTile = await this.getEventTileMarkup(mxEv, joined);
}
} catch (e) {
// TODO: Handle callEvent errors
logger.error(e);