From f7c10036602a94bc8d24422899b62a43bf3af073 Mon Sep 17 00:00:00 2001 From: Michael Descy Date: Tue, 9 Aug 2016 17:26:36 -0400 Subject: [PATCH 01/11] Closes recurring task bug #113. - Recurring tasks with priority and creation date no longer append part of the task's creation date to the new recurring task. --- TodoTxtMac/TTMTask.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/TodoTxtMac/TTMTask.m b/TodoTxtMac/TTMTask.m index 70ddfde..1b915f9 100644 --- a/TodoTxtMac/TTMTask.m +++ b/TodoTxtMac/TTMTask.m @@ -60,7 +60,9 @@ @implementation TTMTask static NSString * const CompletionDatePattern = @"(?<=^x[ ])((\\d{4})-(\\d{2})-(\\d{2}))(?=[ ]|$)"; static NSString * const PriorityTextPattern = @"^(\\([A-Z]\\)[ ])"; static NSString * const CreationDatePatternIncomplete = @"(?<=^|\\([A-Z]\\)[ ])((\\d{4})-(\\d{2})-(\\d{2}))(?=[ ]|$)"; +static NSString * const CreationDatePatternIncompletePlusTrailingSpace = @"(?<=^|\\([A-Z]\\)[ ])((\\d{4})-(\\d{2})-(\\d{2}))([ ]|$)"; static NSString * const CreationDatePatternCompleted = @"(?<=^x[ ]((\\d{4})-(\\d{2})-(\\d{2}))[ ])((\\d{4})-(\\d{2})-(\\d{2}))(?=[ ]|$)"; +static NSString * const CreationDatePatternCompletedPlusTrailingSpace = @"(?<=^x[ ]((\\d{4})-(\\d{2})-(\\d{2}))[ ])((\\d{4})-(\\d{2})-(\\d{2}))(?=[ ]|$)"; static NSString * const DueDatePattern = @"(?<=(^|[ ])due:)((\\d{4})-(\\d{2})-(\\d{2}))(?=[ ]|$)"; static NSString * const FullDueDatePatternMiddleOrEnd = @"(([ ])due:)((\\d{4})-(\\d{2})-(\\d{2}))(?=[ ]|$)"; static NSString * const FullDueDatePatternBeginning = @"^due:((\\d{4})-(\\d{2})-(\\d{2}))[ ]?|$"; @@ -833,9 +835,9 @@ - (void)removeCreationDate { NSString *newRawText; if (!self.isCompleted) { - newRawText = [self.rawText substringFromIndex:11]; + newRawText = [self.rawText replace:RX(CreationDatePatternIncompletePlusTrailingSpace) with:@""]; } else { - newRawText = [self.rawText replace:RX(CreationDatePatternCompleted) with:@""]; + newRawText = [self.rawText replace:RX(CreationDatePatternCompletedPlusTrailingSpace) with:@""]; } self.rawText = newRawText; } From 4b741c980a2f92a7aa20a3ac96ed3333b82fb3e0 Mon Sep 17 00:00:00 2001 From: Michael Descy Date: Tue, 9 Aug 2016 20:21:17 -0400 Subject: [PATCH 02/11] Fixed preference window sizing bug that cut off bottom of "Application behaviors" box. --- TodoTxtMac/TTMPreferences.xib | 68 +++++++++++++++++------------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/TodoTxtMac/TTMPreferences.xib b/TodoTxtMac/TTMPreferences.xib index 4b044f0..3345936 100644 --- a/TodoTxtMac/TTMPreferences.xib +++ b/TodoTxtMac/TTMPreferences.xib @@ -1,8 +1,8 @@ - + - + @@ -20,38 +20,38 @@ - - - - + + + + - - + + - + - + - + - + - + - - + + @@ -63,8 +63,8 @@ - - + + @@ -144,19 +144,19 @@ - + - + - + - + @@ -168,8 +168,8 @@ - - + + @@ -272,20 +272,20 @@ - + - - + + - - + + - + - - + + - + @@ -1284,10 +1288,10 @@ - + - + @@ -1295,7 +1299,7 @@ - + @@ -1313,7 +1317,7 @@