fix: wrong word count when empty line exists (#795)

This commit is contained in:
Yifan Song 2024-11-12 07:11:16 +01:00 committed by GitHub
parent bdb127109f
commit 0babb8b451
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -133,9 +133,8 @@ impl TextExportWorker {
match item {
Group(g) => self.frame(&g.frame),
Text(t) => {
write!(self.w, "{}", t.text.as_str())
write!(self.w, " {}", t.text.as_str())
}
// Meta(ContentHint(c), _) => f.write_char(*c),
Link(..) | Shape(..) | Image(..) => self.w.write_all(b"object"),
Tag(..) => Ok(()),
}