While generating text of word file Comment not start righting in new line

while generating text of word file Comment not start righting in new line.
If comment not start in new line then it will create issue while search comment in the text file.

for more information.

Comment not start with new Line.zip (149.4 KB)
you can see the attachment.

@hemalp
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-25287

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

As a temporary workaround you can put an empty paragraph at the beginning of the comment before saving the document as TXT:

Document doc = new Document(@"C:\Temp\in.docx");

doc.GetChildNodes(NodeType.Comment, true).Cast<Comment>().ToList()
    .ForEach(c => { c.PrependChild(new Paragraph(doc)); });
            
doc.Save(@"C:\Temp\out.txt");

The issues you have found earlier (filed as WORDSNET-25287) have been fixed in this Aspose.Words for .NET 23.5 update also available on NuGet.