Skip to content

Commit 1228eb4

Browse files
committed
Yet another exception during parsing of whitespaces #191
1 parent 9c1fe98 commit 1228eb4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Html2OpenXml/Expressions/TextExpression.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public override IEnumerable<OpenXmlElement> Interpret (ParsingContext context)
8282
if (text.Length == 0 && prevIsPhrasing && nextIsPhrasing
8383
&& (endsWithSpace || startsWithSpace)
8484
&& !(node.PreviousSibling!.TextContent.Length == 0
85+
|| node.NextSibling!.TextContent.Length == 0
8586
|| node.PreviousSibling!.TextContent[node.PreviousSibling!.TextContent.Length - 1].IsWhiteSpaceCharacter()
8687
|| node.NextSibling!.TextContent[0].IsWhiteSpaceCharacter()
8788
))

0 commit comments

Comments
 (0)