Skip to content

Commit 8918900

Browse files
authored
Merge pull request #211 from exvacuum/main
2 parents b4ea1fc + d727935 commit 8918900

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/runtime/src/line.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl Line {
149149
/// Returns the substring of [`Line::text`] covered by the passed `attribute`s [`MarkupAttribute::position`] and [`MarkupAttribute::length`] fields.
150150
pub fn text_for_attribute(&self, attribute: &MarkupAttribute) -> &str {
151151
assert!(
152-
self.text.len() <= attribute.position + attribute.length,
152+
self.text.len() >= attribute.position + attribute.length,
153153
"Attribute \"{attribute}\" represents a range not representable by this text: \"{}\". \
154154
Does this MarkupAttribute belong to this MarkupParseResult?",
155155
self.text

0 commit comments

Comments
 (0)