MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / yaml_scalar

Function yaml_scalar

crates/openshell-tui/src/app.rs:839–847  ·  view source on GitHub ↗
(value: &str)

Source from the content-addressed store, hash-verified

837}
838
839fn yaml_scalar(value: &str) -> String {
840 let escaped = value
841 .replace('\\', "\\\\")
842 .replace('"', "\\\"")
843 .replace('\n', "\\n")
844 .replace('\r', "\\r")
845 .replace('\t', "\\t");
846 format!("\"{escaped}\"")
847}
848
849impl App {
850 #[allow(clippy::large_types_passed_by_value)] // Theme is Copy; one-shot ctor

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected