From 1bb25591b77a14a17bd05d79316ce703bcbcc3a6 Mon Sep 17 00:00:00 2001 From: Rory Dudley Date: Mon, 20 May 2024 00:17:01 -0600 Subject: Don't clear 'out' unconditionally Only clear the 'out' vector when the verse is not a couplet, otherwise text will not be piped to the next verse in the poem. --- src/poem/elements/verse.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/poem/elements/verse.rs') diff --git a/src/poem/elements/verse.rs b/src/poem/elements/verse.rs index 307ebc8..b0d451b 100644 --- a/src/poem/elements/verse.rs +++ b/src/poem/elements/verse.rs @@ -398,8 +398,10 @@ impl Verse { return Ok(output.status.code().unwrap_or(-1)); } - out.clear(); err.clear(); + if self.meter != Rune::Couplet { + out.clear(); + } Ok(output.status.code().unwrap_or(0)) } -- cgit v1.2.3