(&self, code_language: &str, output: &mut String)
| 455 | } |
| 456 | |
| 457 | fn start_code_block(&self, code_language: &str, output: &mut String) { |
| 458 | let label = if code_language.is_empty() { |
| 459 | "code".to_string() |
| 460 | } else { |
| 461 | code_language.to_string() |
| 462 | }; |
| 463 | let _ = writeln!( |
| 464 | output, |
| 465 | "{}", |
| 466 | format!("╭─ {label}") |
| 467 | .bold() |
| 468 | .with(self.color_theme.code_block_border) |
| 469 | ); |
| 470 | } |
| 471 | |
| 472 | fn finish_code_block(&self, code_buffer: &str, code_language: &str, output: &mut String) { |
| 473 | output.push_str(&self.highlight_code(code_buffer, code_language)); |