Skip to main content

fold_log

Function fold_log 

Source
pub fn fold_log(input: &str) -> String
Expand description

Folds runs of templated lines in input into a header + a JSON array of distinct templates + one compact row (template_id then captured values) per original line. Returns input unchanged when folding cannot help (too few lines, no shared templates, or a line contains the placeholder char). Never panics.