1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-08 21:42:24 +03:00

Review changes

Signed-off-by: Oliver Hunt <oliver@hunt.bz>
This commit is contained in:
Oliver Hunt
2017-06-06 12:29:23 +01:00
parent a640e943f7
commit dd6171a39e
2 changed files with 9 additions and 14 deletions

View File

@@ -365,11 +365,11 @@ export function bodyToHtml(content, highlights, opts) {
}
function addCodeCopyButton(safeBody) {
var el = document.createElement("div");
const el = document.createElement("div");
el.innerHTML = safeBody;
var codeBlocks = Array.from(el.getElementsByTagName("pre"));
const codeBlocks = Array.from(el.getElementsByTagName("pre"));
codeBlocks.forEach(p => {
var button = document.createElement("span");
const button = document.createElement("span");
button.className = "mx_EventTile_copyButton";
p.appendChild(button);
});