diff --git a/Adaptation/.vscode/launch.json b/Adaptation/.vscode/launch.json index 643f540..cee459e 100644 --- a/Adaptation/.vscode/launch.json +++ b/Adaptation/.vscode/launch.json @@ -4,7 +4,7 @@ "name": ".NET Core Attach", "type": "coreclr", "request": "attach", - "processId": 11456 + "processId": 25140 } ] } diff --git a/Adaptation/FileHandlers/json/FileRead.cs b/Adaptation/FileHandlers/json/FileRead.cs index 9a7e786..08d7fbd 100644 --- a/Adaptation/FileHandlers/json/FileRead.cs +++ b/Adaptation/FileHandlers/json/FileRead.cs @@ -325,7 +325,11 @@ public class FileRead : Shared.FileRead, IFileRead private static void WriteMarkdownFile(FileConnectorConfiguration fileConnectorConfiguration, string[] alternateTargetFolders, ReadOnlyCollection workItems, ReadOnlyCollection workItemTypes) { + string old; + string html; + string text; string json; + string checkFile; string? pathRoot; List spaces = new(); List lines = new(); @@ -356,7 +360,16 @@ public class FileRead : Shared.FileRead, IFileRead foreach (string workItemType in workItemTypes) { AppendLines(spaces, lines, workItemAndChildren, workItemType); - File.WriteAllText(Path.Combine(alternateTargetFolder, $"{workItemType}.md"), string.Join(Environment.NewLine, lines)); + checkFile = Path.Combine(alternateTargetFolder, $"{workItemType}.md"); + text = string.Join(Environment.NewLine, lines); + old = !File.Exists(checkFile) ? string.Empty : File.ReadAllText(checkFile); + if (text != old) + File.WriteAllText(checkFile, text); + checkFile = Path.Combine(alternateTargetFolder, $"{workItemType}.html"); + html = CommonMark.CommonMarkConverter.Convert(text); + old = !File.Exists(checkFile) ? string.Empty : File.ReadAllText(checkFile); + if (html != old) + File.WriteAllText(checkFile, html); } } } diff --git a/Adaptation/MESAFIBACKLOG.Tests.csproj b/Adaptation/MESAFIBACKLOG.Tests.csproj index b0dd379..91c2405 100644 --- a/Adaptation/MESAFIBACKLOG.Tests.csproj +++ b/Adaptation/MESAFIBACKLOG.Tests.csproj @@ -36,6 +36,7 @@ + NU1701 NU1701 diff --git a/MESAFIBACKLOG.csproj b/MESAFIBACKLOG.csproj index 2f646f7..0522ee5 100644 --- a/MESAFIBACKLOG.csproj +++ b/MESAFIBACKLOG.csproj @@ -193,6 +193,9 @@ + + 0.15.1 + 2.57.0