File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/Html2OpenXml/Expressions Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
- /* Copyright (C) Olivier Nizet https://github.com/onizet/html2openxml - All Rights Reserved
1
+ /* Copyright (C) Olivier Nizet https://github.com/onizet/html2openxml - All Rights Reserved
2
2
*
3
3
* This source is subject to the Microsoft Permissive License.
4
4
* Please see the License.txt file for more information.
@@ -208,7 +208,7 @@ protected static IEnumerable<OpenXmlElement> CombineRuns(IEnumerable<OpenXmlElem
208
208
// run can be also a hyperlink
209
209
textElement ??= run . GetFirstChild < Run > ( ) ? . GetFirstChild < Text > ( ) ;
210
210
211
- if ( textElement != null ) // could be null when <br/>
211
+ if ( textElement != null && ! string . IsNullOrEmpty ( textElement . Text ) ) // could be null when <br/>
212
212
{
213
213
var text = textElement . Text ;
214
214
// we know that the text cannot be empty because we skip them in TextExpression
@@ -225,4 +225,4 @@ protected static IEnumerable<OpenXmlElement> CombineRuns(IEnumerable<OpenXmlElem
225
225
yield return run ;
226
226
}
227
227
}
228
- }
228
+ }
You can’t perform that action at this time.
0 commit comments