Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ac0fcf3

Browse files
committed
fix: Add missing functions for setting stylesheet colors
1 parent c2bebe8 commit ac0fcf3

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)

AltStyle によって変換されたページ (->オリジナル) /