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

Function apply_code_block_background

rust/crates/claw-cli/src/render.rs:627–636  ·  view source on GitHub ↗
(line: &str)

Source from the content-addressed store, hash-verified

625}
626
627fn apply_code_block_background(line: &str) -> String {
628 let trimmed = line.trim_end_matches('\n');
629 let trailing_newline = if trimmed.len() == line.len() {
630 ""
631 } else {
632 "\n"
633 };
634 let with_background = trimmed.replace("\u{1b}[0m", "\u{1b}[0;48;5;236m");
635 format!("\u{1b}[48;5;236m{with_background}\u{1b}[0m{trailing_newline}")
636}
637
638fn find_stream_safe_boundary(markdown: &str) -> Option<usize> {
639 let mut in_fence = false;

Callers 1

highlight_codeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected