File tree 2 files changed +2
-0
lines changed
src/Html2OpenXml/Expressions
2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ public override IEnumerable<OpenXmlElement> Interpret (ParsingContext context)
101
101
text = " " + text ;
102
102
}
103
103
else if ( startsWithSpace && prevIsPhrasing
104
+ && node . PreviousSibling ! . TextContent . Length > 0
104
105
&& ! node . PreviousSibling ! . TextContent [ node . PreviousSibling . TextContent . Length - 1 ] . IsWhiteSpaceCharacter ( ) )
105
106
{
106
107
text = " " + text ;
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ public void ConsecutiveDivs_ReturnsMultipleParagraphs ()
40
40
[ TestCase ( "<span> Hello\r \n \r \n World! </span>" ) ]
41
41
[ TestCase ( "<div><u>Hello World! </u></div>" ) ]
42
42
[ TestCase ( "<hr>\n <span>Hello World!</span>" ) ]
43
+ [ TestCase ( "<p><span></span> Hello World!</p>" ) ]
43
44
public void Multiline_ReturnsCollapsedText ( string html )
44
45
{
45
46
var elements = converter . Parse ( html ) ;
You can’t perform that action at this time.
0 commit comments