diff --git a/src/meta_plugin/text.rs b/src/meta_plugin/text.rs index 1fd7f17..ff94123 100644 --- a/src/meta_plugin/text.rs +++ b/src/meta_plugin/text.rs @@ -232,7 +232,7 @@ impl MetaPlugin for TextMetaPlugin { } // If content is text and we have some data, output word and line counts - if self.is_binary_content == Some(false) && !self.buffer.is_empty() { + if self.is_binary_content == Some(false) && (!self.buffer.is_empty() || self.word_count > 0 || self.line_count > 0) { // Process any remaining data in utf8_buffer if !self.utf8_buffer.is_empty() { self.count_text_stats(&[]);