MCPcopy Create free account
hub / github.com/0xKarl-dev/claw-codes / start_code_block

Method start_code_block

rust/crates/claw-cli/src/render.rs:457–470  ·  view source on GitHub ↗
(&self, code_language: &str, output: &mut String)

Source from the content-addressed store, hash-verified

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));

Callers 1

render_eventMethod · 0.80

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected