diff --git a/src/render/text_renderer.rs b/src/render/text_renderer.rs index 8680658..c584ebc 100644 --- a/src/render/text_renderer.rs +++ b/src/render/text_renderer.rs @@ -218,7 +218,6 @@ impl TaggedLine { s: " ".repeat(len), tag: tag.clone(), })); - self.len += len; } /// Add a new fragment to the start of the line diff --git a/src/tests.rs b/src/tests.rs index 6513a09..d78298f 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -2087,6 +2087,12 @@ foo ); } +#[test] +fn test_issue_187() { + let html = br#"
/
/
na na na na na na na na na na na na na na na

"#; + let _ = crate::config::plain().string_from_read(&html[..], 17); +} + #[cfg(feature = "css")] mod css_tests { use super::{