Skip to content

Commit

Permalink
Merge pull request #211 from exvacuum/main
Browse files Browse the repository at this point in the history
  • Loading branch information
janhohenheim authored Aug 4, 2024
2 parents b4ea1fc + d727935 commit 8918900
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/runtime/src/line.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl Line {
/// Returns the substring of [`Line::text`] covered by the passed `attribute`s [`MarkupAttribute::position`] and [`MarkupAttribute::length`] fields.
pub fn text_for_attribute(&self, attribute: &MarkupAttribute) -> &str {
assert!(
self.text.len() <= attribute.position + attribute.length,
self.text.len() >= attribute.position + attribute.length,
"Attribute \"{attribute}\" represents a range not representable by this text: \"{}\". \
Does this MarkupAttribute belong to this MarkupParseResult?",
self.text
Expand Down

0 comments on commit 8918900

Please sign in to comment.