Skip to content

Commit 454d650

Browse files
authored
Merge pull request #234 from Muscraft/missing-set-style
fix: Add missing functions for setting stylesheet colors
2 parents c2bebe8 + ac0fcf3 commit 454d650

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/renderer/mod.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,24 @@ impl Renderer {
206206
self.stylesheet.none = style;
207207
self
208208
}
209+
210+
/// Set the output style for [`AnnotationKind::Context`]
211+
pub const fn context(mut self, style: Style) -> Self {
212+
self.stylesheet.context = style;
213+
self
214+
}
215+
216+
/// Set the output style for additions
217+
pub const fn addition(mut self, style: Style) -> Self {
218+
self.stylesheet.addition = style;
219+
self
220+
}
221+
222+
/// Set the output style for removals
223+
pub const fn removal(mut self, style: Style) -> Self {
224+
self.stylesheet.removal = style;
225+
self
226+
}
209227
}
210228

211229
impl Renderer {

0 commit comments

Comments
 (0)