mirror of
https://github.com/soywod/himalaya.git
synced 2024-11-22 11:00:19 +00:00
table: reset color after cell (#372)
Co-authored-by: Clément DOUIN <soywod@users.noreply.github.com>
This commit is contained in:
parent
b7157573f2
commit
4d91a5d74e
1 changed files with 8 additions and 1 deletions
|
@ -134,7 +134,14 @@ impl Print for Cell {
|
|||
.context(format!(r#"cannot apply colors to cell "{}""#, self.value))?;
|
||||
|
||||
// Writes the colorized cell to stdout
|
||||
write!(writer, "{}", self.value).context(format!(r#"cannot print cell "{}""#, self.value))
|
||||
write!(writer, "{}", self.value)
|
||||
.context(format!(r#"cannot print cell "{}""#, self.value))?;
|
||||
|
||||
// Resets color after cell
|
||||
writer
|
||||
.reset()
|
||||
.context(format!(r#"cannot reset color in cell "{}""#, self.value))?;
|
||||
write!(writer, "").context(format!(r#"cannot print cell "{}""#, self.value))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue