Skip to content

Commit

Permalink
fix whitespace extraction issue caused by PR #1346
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyqus committed Oct 19, 2024
1 parent 8538514 commit 259a748
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions OpenXmlFormats/Wordprocessing/wml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2256,13 +2256,13 @@ public static CT_Text Parse(XmlNode node, XmlNamespaceManager namespaceManager)
StringBuilder sb = new StringBuilder();
foreach (XmlNode elem in node.ChildNodes)
{
if (elem.NodeType==XmlNodeType.Text)
if(elem.NodeType==XmlNodeType.Element && elem.LocalName=="cr")
{
sb.Append(elem.InnerText);
sb.Append("\n");
}
else if (elem.NodeType==XmlNodeType.Element && elem.LocalName=="cr")
else
{
sb.Append("\n");
sb.Append(elem.InnerText);
}
}

Expand Down

0 comments on commit 259a748

Please sign in to comment.