fix mobile MarkDown bug

This commit is contained in:
MathMan05 2025-03-15 14:58:34 -05:00
parent cf820653ee
commit 9ab8a95199

View file

@ -743,8 +743,13 @@ class MarkDown {
if (!box.hasChildNodes() || html.isEqualNode(Array.from(box.childNodes)[0])) {
//console.log("no replace needed");
} else {
box.innerHTML = "";
box.append(html);
const childChild = Array.from(box.childNodes)[0];
if (!childChild || html.isEqualNode(Array.from(childChild.childNodes)[0])) {
box.innerHTML = "";
box.append(html);
} else {
//console.log("empty replace not happened");
}
}
//console.timeEnd();
}