Skip to content

Commit

Permalink
Merge pull request #188 from jugglerchris/bugfix_187
Browse files Browse the repository at this point in the history
Fix a miscalculation of line length leading to a debug assert.
  • Loading branch information
jugglerchris authored Nov 22, 2024
2 parents 80b32a7 + c9447cb commit 378fd88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/render/text_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ impl<T: Debug + Eq + PartialEq + Clone + Default> TaggedLine<T> {
s: " ".repeat(len),
tag: tag.clone(),
}));
self.len += len;
}

/// Add a new fragment to the start of the line
Expand Down
6 changes: 6 additions & 0 deletions src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2087,6 +2087,12 @@ foo
);
}

#[test]
fn test_issue_187() {
let html = br#"<div><table><tbody><tr><td><div><table><tbody><tr><td><div><pre>na na na na na na na na na na na na na na na</p></div></td></tr>/<tbody></table></div></td></tr>/<tbody></table></div>"#;
let _ = crate::config::plain().string_from_read(&html[..], 17);
}

#[cfg(feature = "css")]
mod css_tests {
use super::{
Expand Down

0 comments on commit 378fd88

Please sign in to comment.