MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / new

Method new

crates/opencode-tui/src/components/markdown/code_block.rs:15–17  ·  view source on GitHub ↗
(language: Option<String>, code: String)

Source from the content-addressed store, hash-verified

13
14impl CodeBlock {
15 pub fn new(language: Option<String>, code: String) -> Self {
16 Self { language, code }
17 }
18
19 pub fn to_lines(&self, theme: &CodeTheme) -> Vec<Vec<Span<'static>>> {
20 if let Some(lines) = syntax::highlight_code(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected