Skip to content

Commit

Permalink
Treat the special _GoBack bookmark by its name
Browse files Browse the repository at this point in the history
  • Loading branch information
onizet committed Jul 8, 2024
1 parent b0df515 commit 864d085
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Html2OpenXml/HtmlConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public async Task ParseHtml(string html, CancellationToken cancellationToken = d

// move the paragraph with BookmarkStart `_GoBack` as the last child
var p = body.GetFirstChild<Paragraph>();
if (p != null && p.HasChild<BookmarkStart>())
if (p != null && p.GetFirstChild<BookmarkStart>()?.Id == "_GoBack")
{
p.Remove();
body.Append(p);
Expand Down

0 comments on commit 864d085

Please sign in to comment.