org-mode: display '+' before relative additions
},
false => {
let base_cell = format!("@{}${}", row + match cli.csv_skip_header { true => 1, _ => 2}, col_idx);
+ let entry = &table[row*col_steps.len() + col];
+ let fmt_str = match cli.relative {
+ true => match entry.frac.sign {
+ -1.0 => format!("%.{}f", cli.precision()),
+ _ => format!("+%.{}f", cli.precision()),
+ },
+ false => format!("%.{}f", cli.precision()),
+ };
print!(" |");
- tblfmt.push(format!("@{}${}={};%.{}f", org_row, org_col, table[row*col_steps.len() + col].org_formula_str(base_cell, cli.relative), cli.precision()));
+ tblfmt.push(format!("@{}${}={};{}", org_row, org_col, entry.org_formula_str(base_cell, cli.relative), fmt_str));
},
}
}