diff options
Diffstat (limited to 'crates/typst-library/src/layout/hide.rs')
| -rw-r--r-- | crates/typst-library/src/layout/hide.rs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/crates/typst-library/src/layout/hide.rs b/crates/typst-library/src/layout/hide.rs index 5f3a5a2d..bb40447d 100644 --- a/crates/typst-library/src/layout/hide.rs +++ b/crates/typst-library/src/layout/hide.rs @@ -1,6 +1,4 @@ -use crate::diag::SourceResult; -use crate::engine::Engine; -use crate::foundations::{elem, Content, Packed, Show, StyleChain}; +use crate::foundations::{elem, Content}; /// Hides content without affecting layout. /// @@ -14,7 +12,7 @@ use crate::foundations::{elem, Content, Packed, Show, StyleChain}; /// Hello Jane \ /// #hide[Hello] Joe /// ``` -#[elem(Show)] +#[elem] pub struct HideElem { /// The content to hide. #[required] @@ -25,10 +23,3 @@ pub struct HideElem { #[ghost] pub hidden: bool, } - -impl Show for Packed<HideElem> { - #[typst_macros::time(name = "hide", span = self.span())] - fn show(&self, _: &mut Engine, _: StyleChain) -> SourceResult<Content> { - Ok(self.body.clone().set(HideElem::hidden, true)) - } -} |
