Commit 5683a2e7a8
Unregistered key
Layout: unified · split
src/message/html.rs +1 −1
| @@ -198,7 +198,7 @@ impl Table { | |||
| 198 | }) | 198 | }) |
| 199 | .collect(); | 199 | .collect(); |
| 200 | 200 | ||
| 201 | let joined = join_cell_text(cells, Span::styled(line::VERTICAL, style)); | 201 | let joined = join_cell_text(cells, Span::styled(line::VERTICAL, style), style); |
| 202 | text.lines.extend(joined.lines); | 202 | text.lines.extend(joined.lines); |
| 203 | 203 | ||
| 204 | nrows += 1; | 204 | nrows += 1; |
src/util.rs +2 −2
| @@ -125,7 +125,7 @@ pub fn space_text(width: usize, style: Style) -> Text<'static> { | |||
| 125 | space_span(width, style).into() | 125 | space_span(width, style).into() |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | pub fn join_cell_text<'a>(texts: Vec<(Text<'a>, usize)>, join: Span<'a>) -> Text<'a> { | 128 | pub fn join_cell_text<'a>(texts: Vec<(Text<'a>, usize)>, join: Span<'a>, style: Style) -> Text<'a> { |
| 129 | let height = texts.iter().map(|t| t.0.height()).max().unwrap_or(0); | 129 | let height = texts.iter().map(|t| t.0.height()).max().unwrap_or(0); |
| 130 | let mut text = Text { lines: vec![Spans(vec![join.clone()]); height] }; | 130 | let mut text = Text { lines: vec![Spans(vec![join.clone()]); height] }; |
| 131 | 131 | ||
| @@ -134,7 +134,7 @@ pub fn join_cell_text<'a>(texts: Vec<(Text<'a>, usize)>, join: Span<'a>) -> Text | |||
| 134 | if let Some(spans) = t.lines.get_mut(i) { | 134 | if let Some(spans) = t.lines.get_mut(i) { |
| 135 | text.lines[i].0.append(&mut spans.0); | 135 | text.lines[i].0.append(&mut spans.0); |
| 136 | } else { | 136 | } else { |
| 137 | text.lines[i].0.push(space_span(w, Style::default())); | 137 | text.lines[i].0.push(space_span(w, style)); |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | text.lines[i].0.push(join.clone()); | 140 | text.lines[i].0.push(join.clone()); |