diff options
Diffstat (limited to 'crates/typst-svg')
| -rw-r--r-- | crates/typst-svg/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/typst-svg/src/lib.rs b/crates/typst-svg/src/lib.rs index 145e23f8..deb5fb00 100644 --- a/crates/typst-svg/src/lib.rs +++ b/crates/typst-svg/src/lib.rs @@ -240,6 +240,10 @@ impl SVGRenderer { self.xml.start_element("g"); self.xml.write_attribute("class", "typst-group"); + if let Some(label) = group.label { + self.xml.write_attribute("data-typst-label", label.as_str()); + } + if let Some(clip_path) = &group.clip_path { let hash = hash128(&group); let id = self.clip_paths.insert_with(hash, || shape::convert_path(clip_path)); |
