How can I delete all the blank lines in the document without deleting the inserted image?

There are inserted images and several text paragraphs in the document. How can I delete all blank lines in the document without deleting the inserted image?
I used the following code to delete the blank lines in the document, but the images in the document were also deleted.:哭泣:

       var paras = doc.GetChildNodes(NodeType.Paragraph, true).OfType<Paragraph>();
        foreach (var para in paras)
        {
                if (para.ToString(SaveFormat.Text) == "\r\n")
                {
                    para.Remove();
                }
         }

@Anghost

Could you please ZIP and attach your input and expected output Word documents here for our reference? We will then provide you more information about your query.