diff --git a/ADO2024/PI2/Helper-2024-06-23.cs b/ADO2024/PI2/Helper-2024-06-23.cs index a0df586..2093ce0 100644 --- a/ADO2024/PI2/Helper-2024-06-23.cs +++ b/ADO2024/PI2/Helper-2024-06-23.cs @@ -42,18 +42,17 @@ internal static partial class Helper20240623 private static Record GetRecord(Input input, FileInfo fileInfo) { Record result; + string line; int? stopLine = null; int? subTasksLine = null; int? codeInsidersLine = null; LineNumber lineNumber = HelperMarkdown.GetLineNumbers(fileInfo); for (int i = 0; i < lineNumber.Lines.Count; i++) { - if (lineNumber.Lines[i].StartsWith(input.CodeInsiders) && lineNumber.Lines[i][^1] == '"') - { - if (lineNumber.Lines.Count > i + 1 && lineNumber.Lines[i + 1] == "```") - codeInsidersLine = i; - } - if (lineNumber.Lines[i] != input.SubTasks) + line = lineNumber.Lines[i]; + if (line.StartsWith(input.CodeInsiders) && line[^1] == ')') + codeInsidersLine = i; + if (line != input.SubTasks) continue; subTasksLine = i; if (codeInsidersLine is null) @@ -242,7 +241,7 @@ internal static partial class Helper20240623 "Day-Helper-2024-06-23", "*.md", "##_Sub-tasks", - "code-insiders", + "-_[code-insiders](", "index.md", "-_[,](", "##_Done", @@ -376,9 +375,9 @@ internal static partial class Helper20240623 string indexFile = args[5]; string searchPattern = args[2]; string directoryFilter = args[8]; - string codeInsiders = $"{args[4]} \""; string done = args[7].Replace('_', ' '); string subTasks = args[3].Replace('_', ' '); + string codeInsiders = args[4].Replace('_', ' '); string sourceDirectory = Path.GetFullPath(args[0]); string? destinationDirectory = args.Count < 8 ? null : Path.GetFullPath(args[9]); long? afterEpochTotalMilliseconds = args.Count < 9 ? null : long.Parse(args[10]); diff --git a/File-Folder-Helper.csproj b/File-Folder-Helper.csproj index 4ec475a..fbc58fa 100644 --- a/File-Folder-Helper.csproj +++ b/File-Folder-Helper.csproj @@ -17,7 +17,7 @@ - +