Skip to content

Commit d497782

Browse files
committed
got rid of unnecessary triple backtick code block detector
1 parent 13babcc commit d497782

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

crates/chat-cli/src/cli/chat/prompt.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -402,17 +402,6 @@ impl Validator for MultiLineValidator {
402402
fn validate(&self, os: &mut ValidationContext<'_>) -> rustyline::Result<ValidationResult> {
403403
let input = os.input();
404404

405-
// Check for code block markers
406-
if input.contains("```") {
407-
// Count the number of ``` occurrences
408-
let triple_backtick_count = input.matches("```").count();
409-
410-
// If we have an odd number of ```, we're in an incomplete code block
411-
if triple_backtick_count % 2 == 1 {
412-
return Ok(ValidationResult::Incomplete);
413-
}
414-
}
415-
416405
// Check for backslash continuation
417406
if input.ends_with('\\') {
418407
return Ok(ValidationResult::Incomplete);

0 commit comments

Comments
 (0)