Deserialize back to math delimiters for editing

This commit is contained in:
Aleks Kissinger 2020-09-20 14:20:35 +01:00
parent becc79d67a
commit e78734bbf6
2 changed files with 15 additions and 1 deletions

View file

@ -534,7 +534,6 @@ export function checkBlockNode(node: Node) {
case "H6":
case "PRE":
case "BLOCKQUOTE":
case "DIV":
case "P":
case "UL":
case "OL":
@ -547,6 +546,9 @@ export function checkBlockNode(node: Node) {
case "TH":
case "TD":
return true;
case "DIV":
// don't treat math nodes as block nodes for deserializing
return !(node as HTMLElement).hasAttribute("data-mx-maths");
default:
return false;
}