Skip to content

Commit

Permalink
Flatten to single match
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Walrus committed Sep 25, 2023
1 parent 5ef4483 commit 066631a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions helix-term/src/ui/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,12 @@ impl Markdown {
HeadingLevel::H5 => heading_styles[4],
HeadingLevel::H6 => heading_styles[5],
},
_ => text_style.add_modifier(match tags.last() {
Some(Tag::Emphasis) => Modifier::ITALIC,
Some(Tag::Strong) => Modifier::BOLD,
Some(Tag::Strikethrough) => Modifier::CROSSED_OUT,
_ => Modifier::empty(),
}),
Some(Tag::Emphasis) => text_style.add_modifier(Modifier::ITALIC),
Some(Tag::Strong) => text_style.add_modifier(Modifier::BOLD),
Some(Tag::Strikethrough) => {
text_style.add_modifier(Modifier::CROSSED_OUT)
}
_ => text_style,
};
spans.push(Span::styled(text, style));
}
Expand Down

0 comments on commit 066631a

Please sign in to comment.