MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / text_section

Function text_section

atomic-cli/src/commands/change/tree.rs:59–65  ·  view source on GitHub ↗
(title: &str, text: &str)

Source from the content-addressed store, hash-verified

57}
58
59fn text_section(title: &str, text: &str) -> Tree {
60 let mut section = Tree::new(title);
61 for line in text.lines().filter(|line| !line.trim().is_empty()) {
62 section.push(line);
63 }
64 section
65}
66
67pub(super) fn render(
68 cmd: &ChangeCmd,

Callers 1

renderFunction · 0.85

Calls 3

linesMethod · 0.45
is_emptyMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected