Skip to content

Commit 360b188

Browse files
committed
cli: Handle 'underline' styling when highlighting w/ HTML output
1 parent 92f0603 commit 360b188

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cli/src/highlight.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ fn parse_color(json: Value) -> Option<Color> {
230230
fn style_to_css(style: ansi_term::Style) -> String {
231231
use std::fmt::Write;
232232
let mut result = "style='".to_string();
233+
if style.is_underline {
234+
write!(&mut result, "text-decoration: underline;").unwrap();
235+
}
233236
if style.is_bold {
234237
write!(&mut result, "font-weight: bold;").unwrap();
235238
}

0 commit comments

Comments
 (0)