File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/Html2OpenXml/Expressions Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ public override IEnumerable<OpenXmlElement> Interpret (ParsingContext context)
86
86
|| node . NextSibling ! . TextContent [ 0 ] . IsWhiteSpaceCharacter ( )
87
87
) )
88
88
{
89
- return [ new Run ( new Text ( " " ) ) ] ;
89
+ return [ new Run ( new Text ( " " ) { Space = SpaceProcessingModeValues . Preserve } ) ] ;
90
90
}
91
91
// we strip out all whitespaces and we stand inside a div. Just skip this text content
92
92
if ( text . Length == 0 && ! preserveBorderSpaces )
@@ -124,7 +124,7 @@ public override IEnumerable<OpenXmlElement> Interpret (ParsingContext context)
124
124
return [ ] ;
125
125
126
126
if ( ! context . PreserveLinebreaks )
127
- return [ new Run ( new Text ( text ) ) ] ;
127
+ return [ new Run ( new Text ( text ) { Space = SpaceProcessingModeValues . Preserve } ) ] ;
128
128
129
129
Run run = EscapeNewlines ( text ) ;
130
130
return [ run ] ;
You can’t perform that action at this time.
0 commit comments