diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-07-09 15:48:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-09 13:48:43 +0000 |
| commit | 3aa7e861e7ffe03193d94c2cfd249739ef746f09 (patch) | |
| tree | 063945efc6eca31a1f2703fc3127e8723e2eab2d /crates/typst-library/src/html/dom.rs | |
| parent | a45c3388a642d6d7321b5c5b684d3582e91cff41 (diff) | |
Support images in HTML export (#6578)
Diffstat (limited to 'crates/typst-library/src/html/dom.rs')
| -rw-r--r-- | crates/typst-library/src/html/dom.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/typst-library/src/html/dom.rs b/crates/typst-library/src/html/dom.rs index 47bcf995..49ff37c4 100644 --- a/crates/typst-library/src/html/dom.rs +++ b/crates/typst-library/src/html/dom.rs @@ -165,6 +165,11 @@ cast! { pub struct HtmlAttrs(pub EcoVec<(HtmlAttr, EcoString)>); impl HtmlAttrs { + /// Creates an empty attribute list. + pub fn new() -> Self { + Self::default() + } + /// Add an attribute. pub fn push(&mut self, attr: HtmlAttr, value: impl Into<EcoString>) { self.0.push((attr, value.into())); |
