summaryrefslogtreecommitdiff
path: root/crates/typst-library/src/layout/hide.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-library/src/layout/hide.rs')
-rw-r--r--crates/typst-library/src/layout/hide.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/typst-library/src/layout/hide.rs b/crates/typst-library/src/layout/hide.rs
index 7f17a7d7..af3d0631 100644
--- a/crates/typst-library/src/layout/hide.rs
+++ b/crates/typst-library/src/layout/hide.rs
@@ -1,3 +1,5 @@
+use smallvec::smallvec;
+
use crate::prelude::*;
/// Hides content without affecting layout.
@@ -22,6 +24,6 @@ pub struct HideElem {
impl Show for HideElem {
#[tracing::instrument(name = "HideElem::show", skip(self))]
fn show(&self, _: &mut Vt, _: StyleChain) -> SourceResult<Content> {
- Ok(self.body().styled(MetaElem::set_data(vec![Meta::Hide])))
+ Ok(self.body().clone().styled(MetaElem::set_data(smallvec![Meta::Hide])))
}
}