Pass parameters to parseHTMLBody directly instead of via object.
This commit is contained in:
parent
c261b9fb23
commit
fd17ffecfb
2 changed files with 2 additions and 2 deletions
|
@ -165,7 +165,7 @@ const sanitizeConfig = {
|
|||
allowedSchemes: [ "http", "https", "ftp", "mailto", "tel", "mxc" ]
|
||||
};
|
||||
|
||||
export function parseHTMLBody({ mediaRepository, platform }, html) {
|
||||
export function parseHTMLBody(platform, mediaRepository, html) {
|
||||
const parseResult = platform.parseHTML(sanitizeHtml(html, sanitizeConfig));
|
||||
const deserializer = new Deserializer(parseResult, mediaRepository);
|
||||
const parts = deserializer.parseNodes(parseResult.rootNodes);
|
||||
|
|
|
@ -49,7 +49,7 @@ export class TextTile extends BaseTextTile {
|
|||
|
||||
_parseBody(body, format) {
|
||||
if (format === "html") {
|
||||
return parseHTMLBody({ mediaRepository: this._mediaRepository, platform: this.platform }, body);
|
||||
return parseHTMLBody(this.platform, this._mediaRepository, body);
|
||||
} else {
|
||||
return parsePlainBody(body);
|
||||
}
|
||||
|
|
Reference in a new issue