MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / indent_level

Function indent_level

crates/opencode-config/src/loader.rs:890–892  ·  view source on GitHub ↗

Compute the indentation level (number of leading spaces) of a line.

(line: &str)

Source from the content-addressed store, hash-verified

888
889/// Compute the indentation level (number of leading spaces) of a line.
890fn indent_level(line: &str) -> usize {
891 line.len() - line.trim_start().len()
892}
893
894/// YAML frontmatter to JSON conversion.
895/// Handles: flat key-value, inline lists/maps, multi-line dash lists,

Callers 3

parse_yaml_mapping_linesFunction · 0.85
parse_yaml_list_linesFunction · 0.85
collect_block_textFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected