diff --git a/src/markdown/text_style.rs b/src/markdown/text_style.rs index 38fd431..eacda84 100644 --- a/src/markdown/text_style.rs +++ b/src/markdown/text_style.rs @@ -136,11 +136,6 @@ impl TextStyle { Ok(styled) } - /// Checks whether this style has any modifiers (bold, italics, etc). - pub(crate) fn has_modifiers(&self) -> bool { - self.flags != 0 - } - fn add_flag(mut self, flag: TextFormatFlags) -> Self { self.flags |= flag as u8; self diff --git a/src/render/text.rs b/src/render/text.rs index a043a2f..739f5ce 100644 --- a/src/render/text.rs +++ b/src/render/text.rs @@ -116,7 +116,7 @@ impl<'a> TextDrawer<'a> { // Crossterm resets colors if any attributes are set so let's just re-apply colors // if the format has anything on it at all. - if style.has_modifiers() { + if style != Default::default() { terminal.set_colors(*self.default_colors)?; } }