From 311aafbaa4fe9fe4c5bd90f8ca93c144d4e52f7c Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Wed, 5 Nov 2025 19:11:01 +0100 Subject: [PATCH] fix Journal: search by title with spaces not hyphens - ParseNote converts filename hyphens to spaces in title - Search pattern must use spaces: 'thursday 6 november 2025' - Restore regex search capability with correct pattern - Fixes Journal to find all entries for that date --- cmd/Journal/main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/Journal/main.go b/cmd/Journal/main.go index 6342cb7..7a3a94d 100644 --- a/cmd/Journal/main.go +++ b/cmd/Journal/main.go @@ -92,9 +92,10 @@ func main() { } // Find journal entries for target date by searching title - // Title format: "Wednesday 5 November 2025 11:01" - // Search pattern: "wednesday-5-november-2025" (date only, no time) - titlePattern := strings.ToLower(targetDate.Format("monday-2-january-2006")) + // Title format in file: "Wednesday 5 November 2025 11:01" + // Title in Note struct: "wednesday 5 november 2025 1101" (hyphens converted to spaces) + // Search pattern: "wednesday 5 november 2025" (date only, no time, with spaces) + titlePattern := strings.ToLower(targetDate.Format("Monday 2 January 2006")) titleFilter, _ := denote.ParseFilter(fmt.Sprintf("title:/%s/", titlePattern)) tagFilter, _ := denote.ParseFilter("tag:journal")