BUG FIX: Report relevant notes after a project title when there are notes on a project

This commit is contained in:
Campbell Alden 2024-02-28 09:24:54 +09:00
parent 52b869cca5
commit f1ac5bb718
3 changed files with 5 additions and 5 deletions

2
Cargo.lock generated
View file

@ -173,7 +173,7 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
[[package]] [[package]]
name = "day-reporter" name = "day-reporter"
version = "1.2.2" version = "1.3.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chrono", "chrono",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "day-reporter" name = "day-reporter"
version = "1.2.2" version = "1.3.0"
edition = "2021" edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View file

@ -180,7 +180,7 @@ impl Reporter for MarkdownReporter {
if options.sanitize_names { if options.sanitize_names {
output = sanitize_names(&output, &task.tags); output = sanitize_names(&output, &task.tags);
} }
return output; output
} }
fn report_project(&mut self, project: &ProjectTree, depth: usize, options: &ReportOptions) -> String { fn report_project(&mut self, project: &ProjectTree, depth: usize, options: &ReportOptions) -> String {
let resolution = &options.resolution; let resolution = &options.resolution;
@ -198,7 +198,7 @@ impl Reporter for MarkdownReporter {
.map(|t| self.report_task(t, depth + 4, options)) .map(|t| self.report_task(t, depth + 4, options))
.collect::<Vec<String>>() .collect::<Vec<String>>()
.join(""); .join("");
format!("{}{}{}{}", String::from(" ").repeat(depth), relevant_notes, project.title, tasks) format!("{}{}{}{}", String::from(" ").repeat(depth), project.title, relevant_notes, tasks)
}, },
Resolution::Project => { Resolution::Project => {
format!("{}- {}{}", String::from(" ").repeat(depth), project.title, relevant_notes) format!("{}- {}{}", String::from(" ").repeat(depth), project.title, relevant_notes)
@ -209,7 +209,7 @@ impl Reporter for MarkdownReporter {
output = sanitize_names(&output, &project.tags); output = sanitize_names(&output, &project.tags);
} }
return output; output
} }
fn report_single_area(&mut self, area: &AreaTree, options: &ReportOptions) -> String { fn report_single_area(&mut self, area: &AreaTree, options: &ReportOptions) -> String {
let project_reports = area.projects let project_reports = area.projects