aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorA Farzat <a@farzat.xyz>2026-03-08 11:04:55 +0300
committerA Farzat <a@farzat.xyz>2026-03-08 11:04:55 +0300
commita44aad5889bcd85d7bdd0be9c54f9111da917cf5 (patch)
treee369a94d3ca23499a440c0963ade064092fae1cf /src
parentb83dfc5da6424fce7bda8c551303cc5bd91447e3 (diff)
downloadoreilly-epub-a44aad5889bcd85d7bdd0be9c54f9111da917cf5.tar.gz
oreilly-epub-a44aad5889bcd85d7bdd0be9c54f9111da917cf5.zip
Add newline between wrapper and chapter content
This makes it easier to identify diff lines caused by quick_xml from those of the wrapper.
Diffstat (limited to 'src')
-rw-r--r--src/xml.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xml.rs b/src/xml.rs
index 058cb1b..7902aa6 100644
--- a/src/xml.rs
+++ b/src/xml.rs
@@ -62,6 +62,7 @@ pub fn build_epub_chapter<R: BufRead, W: Write>(
// Write wrapper prefix to output first.
out.write_all(wrapper_prefix.as_bytes())?;
+ out.write_all(b"\n")?;
// Setup the XML Reader and Writer.
let mut reader = Reader::from_reader(fragment_input);
@@ -109,6 +110,7 @@ pub fn build_epub_chapter<R: BufRead, W: Write>(
}
// Finish by flushing wrapper suffix to output.
+ out.write_all(b"\n")?;
out.write_all(wrapper_suffix.as_bytes())?;
Ok(())