---------------- useful utility functions --------------------
(vec: &'s[StackInfo<'a, 'op>])
| 3766 | |
| 3767 | // ---------------- useful utility functions -------------------- |
| 3768 | fn top<'s, 'a:'s, 'op:'a>(vec: &'s[StackInfo<'a, 'op>]) -> &'s StackInfo<'a, 'op> { |
| 3769 | return &vec[vec.len()-1]; |
| 3770 | } |
| 3771 | // Replace the attrs of 'mathml' with 'attrs' and keep the global attrs of 'mathml' (i.e, lift 'attrs' to 'mathml' for replacing children) |
| 3772 | pub fn add_attrs<'a>(mathml: Element<'a>, attrs: Vec<Attribute>) -> Element<'a> { |
| 3773 | static GLOBAL_ATTRS: phf::Set<&str> = phf_set! { |
no test coverage detected