diff --git a/src/Html2OpenXml/Expressions/PhrasingElementExpression.cs b/src/Html2OpenXml/Expressions/PhrasingElementExpression.cs index c7619824..74cc8197 100644 --- a/src/Html2OpenXml/Expressions/PhrasingElementExpression.cs +++ b/src/Html2OpenXml/Expressions/PhrasingElementExpression.cs @@ -1,4 +1,4 @@ -/* Copyright (C) Olivier Nizet https://github.com/onizet/html2openxml - All Rights Reserved +/* Copyright (C) Olivier Nizet https://github.com/onizet/html2openxml - All Rights Reserved * * This source is subject to the Microsoft Permissive License. * Please see the License.txt file for more information. @@ -208,7 +208,7 @@ protected static IEnumerable CombineRuns(IEnumerable()?.GetFirstChild(); - if (textElement != null) // could be null when
+ if (textElement != null && !string.IsNullOrEmpty(textElement.Text)) // could be null when
{ var text = textElement.Text; // we know that the text cannot be empty because we skip them in TextExpression @@ -225,4 +225,4 @@ protected static IEnumerable CombineRuns(IEnumerable