summaryrefslogtreecommitdiff
path: root/src/model/styles.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-11-21 17:12:16 +0100
committerLaurenz <laurmaedje@gmail.com>2022-11-21 17:12:16 +0100
commitdd9c323941260a1d08d5113dbefa023713f553da (patch)
tree48c813c01a83f5c6ca67ebbabd041c0298eb0da2 /src/model/styles.rs
parentc28d2130ddda3ae9b25cc16c3015087990ccb6e9 (diff)
Show with set
Diffstat (limited to 'src/model/styles.rs')
-rw-r--r--src/model/styles.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/model/styles.rs b/src/model/styles.rs
index 4195d3e1..30db00bd 100644
--- a/src/model/styles.rs
+++ b/src/model/styles.rs
@@ -491,6 +491,8 @@ pub enum Transform {
Content(Content),
/// A function to apply to the match.
Func(Func),
+ /// Apply styles to the content.
+ Style(StyleMap),
}
impl Transform {
@@ -512,6 +514,7 @@ impl Transform {
}
Ok(result?.display())
}
+ Transform::Style(styles) => Ok(content.styled_with_map(styles.clone())),
}
}
}