Ensure that inline display without color has newlines

This was broken in 3147eb8e6a when
newline splitting was made consistent, and
2071517621 only fixed the inline case
when color was enabled.

Fixed #383
pull/356/merge
Wilfred Hughes 2022-10-28 23:42:52 +07:00
parent 28c3b0ef5d
commit 7f7b35441b
2 changed files with 5 additions and 2 deletions

@ -12,6 +12,9 @@ errors.
Line numbers styling has been tweaked to make it more visually
distinct from file content.
Fixed an issue with inline display discarding newlines when color is
disabled, leading to broken display.
## 0.37 (released 14th October 2022)
### Manual

@ -45,11 +45,11 @@ pub fn print(
(
split_on_newlines(lhs_src)
.iter()
.map(|s| (*s).to_owned())
.map(|s| format!("{}\n", s))
.collect(),
split_on_newlines(rhs_src)
.iter()
.map(|s| (*s).to_owned())
.map(|s| format!("{}\n", s))
.collect(),
)
};