diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-07-08 10:52:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-08 08:52:43 +0000 |
| commit | 0a3c6939dd274f40672484695d909c2cc0d0d755 (patch) | |
| tree | 465c10338230b895fdd06c8b3491f1734e8a2932 /crates/typst-library/src/pdf | |
| parent | 36ecbb2c8dccc1a31c43fee1466f1425844d8607 (diff) | |
Rewrite foundations of native elements (#6547)
Diffstat (limited to 'crates/typst-library/src/pdf')
| -rw-r--r-- | crates/typst-library/src/pdf/embed.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/typst-library/src/pdf/embed.rs b/crates/typst-library/src/pdf/embed.rs index 4c01cd65..0f93f95a 100644 --- a/crates/typst-library/src/pdf/embed.rs +++ b/crates/typst-library/src/pdf/embed.rs @@ -48,7 +48,6 @@ pub struct EmbedElem { let resolved = id.vpath().as_rootless_path().to_string_lossy().replace("\\", "/").into(); Derived::new(path.clone(), resolved) )] - #[borrowed] pub path: Derived<EcoString, EcoString>, /// Raw file data, optionally. @@ -72,17 +71,15 @@ pub struct EmbedElem { pub relationship: Option<EmbeddedFileRelationship>, /// The MIME type of the embedded file. - #[borrowed] pub mime_type: Option<EcoString>, /// A description for the embedded file. - #[borrowed] pub description: Option<EcoString>, } impl Show for Packed<EmbedElem> { fn show(&self, engine: &mut Engine, styles: StyleChain) -> SourceResult<Content> { - if TargetElem::target_in(styles) == Target::Html { + if styles.get(TargetElem::target) == Target::Html { engine .sink .warn(warning!(self.span(), "embed was ignored during HTML export")); |
