summaryrefslogtreecommitdiff
path: root/src/doc.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc.rs')
-rw-r--r--src/doc.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/doc.rs b/src/doc.rs
index 988520c5..47bdb23d 100644
--- a/src/doc.rs
+++ b/src/doc.rs
@@ -267,6 +267,10 @@ impl Frame {
/// Attach the metadata from this style chain to the frame.
pub fn meta(&mut self, styles: StyleChain) {
for meta in styles.get(Meta::DATA) {
+ if matches!(meta, Meta::Hidden) {
+ self.clear();
+ break;
+ }
self.push(Point::zero(), Element::Meta(meta, self.size));
}
}
@@ -533,6 +537,8 @@ pub enum Meta {
/// An identifiable piece of content that produces something within the
/// area this metadata is attached to.
Node(StableId, Content),
+ /// Indicates that the content is hidden.
+ Hidden,
}
#[node]