Skip to content

Commit

Permalink
better replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
stevencohn committed Sep 28, 2024
1 parent 8cebec2 commit f931f7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions OneMore/Commands/Edit/ConvertMarkdownCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace River.OneMoreAddIn.Commands
using River.OneMoreAddIn.Models;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Xml.Linq;

Expand Down Expand Up @@ -61,9 +62,8 @@ public override async Task Execute(params object[] args)

var filepath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());

var text = reader
.ReadTextFrom(paragraphs, allContent)
.Replace("<br>", string.Empty);
var text = reader.ReadTextFrom(paragraphs, allContent);
text = Regex.Replace(text, @"<br>([\n\r]$)", "$1");

var body = OneMoreDig.ConvertMarkdownToHtml(filepath, text);

Expand Down

0 comments on commit f931f7c

Please sign in to comment.