Skip to content

Commit

Permalink
Make linter happier
Browse files Browse the repository at this point in the history
  • Loading branch information
su-ex committed Apr 7, 2023
1 parent def6646 commit c291d03
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/stores/room-list/previews/MessageEventPreview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export class MessageEventPreview implements IPreview {
const cleanedLines = body.replace(/<br\/?>/gi, "\n"); // replace line breaks before removing them
// run it through DOMParser to fixup encoded html entities
const document = new DOMParser().parseFromString(cleanedLines, "text/html").documentElement;
document.querySelectorAll("[data-mx-spoiler]").forEach(spoiler => spoiler.textContent = _t("[spoiler]"));
document
.querySelectorAll("[data-mx-spoiler]")
.forEach((spoiler) => (spoiler.textContent = _t("[spoiler]")));
body = document.textContent;
}

Expand Down

0 comments on commit c291d03

Please sign in to comment.