format better for markdown

This commit is contained in:
Adam R. Grey 2021-10-28 09:35:04 -04:00
parent f7091f88d9
commit 99acb25bca

View File

@ -74,11 +74,17 @@ namespace director
{
var text = new StringBuilder();
text.AppendLine($"# {todo.Occurrence._event.Summary}");
text.AppendLine();
ProcessionLine prevLine = null;
foreach (var line in todo.Configuration.checklist)
{
if (line.type != LineType.text)
{
if(prevLine != null && prevLine.type == LineType.text)
{
text.AppendLine();
}
text.Append("* [ ] ");
}
else
@ -86,6 +92,8 @@ namespace director
text.AppendLine();
}
text.AppendLine($"{line.description}");
prevLine = line;
}
File.WriteAllText(checklistFilename, text.ToString());
checklistSync();