html: Add support for mathematical messages

According to MSC2191 / Matrix 1.11
This commit is contained in:
Kévin Commaille
2024-06-21 22:11:49 +02:00
committed by Kévin Commaille
parent ba76e0ee3a
commit 002fe2fb3d
4 changed files with 83 additions and 5 deletions

View File

@@ -26,7 +26,8 @@ fn elements() {
// `<div>` element.
let div_node = html_children.next().unwrap();
let div_element = div_node.as_element().unwrap().to_matrix();
assert_matches!(div_element.element, MatrixElement::Div);
assert_matches!(div_element.element, MatrixElement::Div(div));
assert_eq!(div.maths, None);
// The `class` attribute is not supported.
assert_eq!(div_element.attrs.len(), 1);