Skip to content

Commit

Permalink
Improved formatting in HtmlParsingService
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Przywóski committed Aug 27, 2024
1 parent ac4f5ae commit 3c97563
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ExportViewer.Core/Services/HtmlParsingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public async Task<IEnumerable<Message>> GetMessages (string filePath , CultureIn
locale.DateTimeFormat.PMDesignator = "po południu";
locale.DateTimeFormat.AMDesignator = "rano";
}

bool isValidDate = DateTime.TryParse(dateElement.TextContent , out var parsedDate);
if (!isValidDate)
{
Expand Down Expand Up @@ -96,6 +97,7 @@ public async Task<IEnumerable<Message>> GetMessages (string filePath , CultureIn
locale.DateTimeFormat.PMDesignator = "po południu";
locale.DateTimeFormat.AMDesignator = "rano";
}

bool isValidDate = DateTime.TryParse(dateElement.TextContent , out var parsedDate);
if (!isValidDate)
{
Expand All @@ -111,6 +113,7 @@ public async Task<IEnumerable<Message>> GetMessages (string filePath , CultureIn
}
});
}

return messages;
}
}
Expand Down

0 comments on commit 3c97563

Please sign in to comment.