We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b4ea1fc + d727935 commit 8918900Copy full SHA for 8918900
crates/runtime/src/line.rs
@@ -149,7 +149,7 @@ impl Line {
149
/// Returns the substring of [`Line::text`] covered by the passed `attribute`s [`MarkupAttribute::position`] and [`MarkupAttribute::length`] fields.
150
pub fn text_for_attribute(&self, attribute: &MarkupAttribute) -> &str {
151
assert!(
152
- self.text.len() <= attribute.position + attribute.length,
+ self.text.len() >= attribute.position + attribute.length,
153
"Attribute \"{attribute}\" represents a range not representable by this text: \"{}\". \
154
Does this MarkupAttribute belong to this MarkupParseResult?",
155
self.text
0 commit comments