Skip to content

Commit 864d085

Browse files
committed
Treat the special _GoBack bookmark by its name
1 parent b0df515 commit 864d085

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Html2OpenXml/HtmlConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public async Task ParseHtml(string html, CancellationToken cancellationToken = d
126126

127127
// move the paragraph with BookmarkStart `_GoBack` as the last child
128128
var p = body.GetFirstChild<Paragraph>();
129-
if (p != null && p.HasChild<BookmarkStart>())
129+
if (p != null && p.GetFirstChild<BookmarkStart>()?.Id == "_GoBack")
130130
{
131131
p.Remove();
132132
body.Append(p);

0 commit comments

Comments
 (0)