diff options
author | Rory Dudley | 2024-05-20 00:17:01 -0600 |
---|---|---|
committer | Rory Dudley | 2024-05-20 00:17:01 -0600 |
commit | 1bb25591b77a14a17bd05d79316ce703bcbcc3a6 (patch) | |
tree | e51175a5973e71999332c7227f6d1f3a0d458a21 /src/poem/elements/verse.rs | |
parent | 4b1b8061e79b42128df4f06fd1e439549bf9696b (diff) | |
download | dwarvish-1bb25591b77a14a17bd05d79316ce703bcbcc3a6.tar.gz |
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.
Diffstat (limited to 'src/poem/elements/verse.rs')
-rw-r--r-- | src/poem/elements/verse.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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)) } |