Add svg and mathml support
This commit is contained in:
parent
cc3f85e6e1
commit
43b3236d3b
6 changed files with 150 additions and 8 deletions
|
|
@ -63,8 +63,13 @@ pub struct Element {
|
|||
|
||||
impl Element {
|
||||
pub fn new(name: impl ToString, kind: ElementKind) -> Self {
|
||||
let mut name = name.to_string();
|
||||
if kind == ElementKind::Foreign {
|
||||
name = name.to_ascii_lowercase()
|
||||
}
|
||||
|
||||
Self {
|
||||
name: name.to_string().to_ascii_lowercase(),
|
||||
name,
|
||||
kind,
|
||||
attributes: BTreeMap::new(),
|
||||
children: vec![],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue