DocX icon indicating copy to clipboard operation
DocX copied to clipboard

Bug: InsertParagraphBeforeSelf(Paragraph) returns Paragraph with wrong content

Open derantell opened this issue 4 years ago • 1 comments

The InsertBeforeOrAfter.InsertParagraphBeforeSelf(Paragraph p) method returns the content of the first previous sibling instead of the last like the other InsertXBeforeSelf methods.

Current:

XElement newlyInserted = Xml.ElementsBeforeSelf().First();

Should be:

XElement newlyInserted = Xml.ElementsBeforeSelf().Last();

I also think the method should return a new Paragraph instance like its companion InsertParagraphAfterSelf(Paragraph p). To get the same instance back was unexpected.

derantell avatar Apr 16 '21 15:04 derantell

Hi, Thank you for pointing this out. This will be fixed in v1.9.

Thank you.

XceedBoucherS avatar Apr 19 '21 17:04 XceedBoucherS