ChrisVilches/Term-Keep

Value for "leading spaces" is hardcoded to `3`. Will fail (look bad) if there are more than 999 notes.

Opened this issue · 0 comments

fn format_normal_note_summary(note: &Note) -> String {
  format!(
    "{: >3}\t{}",
    note.id.unwrap().to_string().bold(),
    format_content(&note.content)
  )
}
fn format_result(score: i64, note: &Note) -> String {
  format!(
    "{}\t{}",
    format!("(score {: >3})", score).purple().bold(),
    vec![
      note_fmt::format_note_icons(note),
      note_fmt::format_note_summary(note)
    ]
    .iter()
    .filter(|s| !s.is_empty())
    .cloned()
    .collect::<Vec<String>>()
    .join(" ")
  )
}

And other places where there is a {: >3} or similar.