Merge pull request #6469 from matrix-org/t3chguy/fix/18211

Fix editing of <sub> & <sup> & <u>
This commit is contained in:
Michael Telatynski 2021-07-26 09:27:30 +01:00 committed by GitHub
commit 405fe436a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -121,6 +121,12 @@ function parseElement(n: HTMLElement, partCreator: PartCreator, lastNode: HTMLEl
return partCreator.plain(`\`${n.textContent}\``);
case "DEL":
return partCreator.plain(`<del>${n.textContent}</del>`);
case "SUB":
return partCreator.plain(`<sub>${n.textContent}</sub>`);
case "SUP":
return partCreator.plain(`<sup>${n.textContent}</sup>`);
case "U":
return partCreator.plain(`<u>${n.textContent}</u>`);
case "LI": {
const indent = " ".repeat(state.listDepth - 1);
if (n.parentElement.nodeName === "OL") {