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 10:00:58 +00:00
committed by GitHub
parent 638175b7d7
commit 52fc8ff255
3 changed files with 68 additions and 23 deletions
+4 -2
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);