table: reset color after cell (#372)

Co-authored-by: Clément DOUIN <soywod@users.noreply.github.com>
This commit is contained in:
Dmitriy Pleshevskiy 2022-05-07 20:29:09 +00:00 committed by GitHub
parent b7157573f2
commit 4d91a5d74e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -134,7 +134,14 @@ impl Print for Cell {
.context(format!(r#"cannot apply colors to cell "{}""#, self.value))?; .context(format!(r#"cannot apply colors to cell "{}""#, self.value))?;
// Writes the colorized cell to stdout // 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))
} }
} }