Skip to content

Commit

Permalink
Prefer "line" over "row"
Browse files Browse the repository at this point in the history
  • Loading branch information
InSyncWithFoo committed Dec 14, 2024
1 parent 4037fc3 commit eb841f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/red_knot_test/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ impl<'s> Parser<'s> {

if captures.name("end").unwrap().is_empty() {
let code_block_start = self.cursor.token_len();
let row = self.source.count_lines(TextRange::up_to(code_block_start)) + 1;
let line = self.source.count_lines(TextRange::up_to(code_block_start)) + 1;

return Err(anyhow::anyhow!("Unterminated code block at row {row}."));
return Err(anyhow::anyhow!("Unterminated code block at line {line}."));
}

let mut config: FxHashMap<&'s str, &'s str> = FxHashMap::default();
Expand Down Expand Up @@ -689,7 +689,7 @@ mod tests {
",
);
let err = super::parse("file.md", &source).expect_err("Should fail to parse");
assert_eq!(err.to_string(), "Unterminated code block at row 2.");
assert_eq!(err.to_string(), "Unterminated code block at line 2.");
}

#[test]
Expand All @@ -709,7 +709,7 @@ mod tests {
",
);
let err = super::parse("file.md", &source).expect_err("Should fail to parse");
assert_eq!(err.to_string(), "Unterminated code block at row 10.");
assert_eq!(err.to_string(), "Unterminated code block at line 10.");
}

#[test]
Expand Down

0 comments on commit eb841f3

Please sign in to comment.