added return lines parsing

This commit is contained in:
Nicolas Constant 2020-08-02 19:40:02 -04:00
parent 31cd662db9
commit a9a2fad375
No known key found for this signature in database
GPG key ID: 1E9F677FB01A5688

View file

@ -33,6 +33,10 @@ namespace BirdsiteLive.Domain.Tools
var tags = new List<Tag>();
messageContent = $" {messageContent} ";
// Replace return lines
messageContent = Regex.Replace(messageContent, @"\r\n\r\n?|\n\n", "</p><p>");
messageContent = Regex.Replace(messageContent, @"\r\n?|\n", "<br/>");
// Extract Urls
var urlMatch = _urlRegex.Matches(messageContent);
foreach (var m in urlMatch)