Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/AngleSharp.Css.Tests/Extensions/InnerText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public void SetInnerText(String fixture, String expectedInnerText, String expect
[TestCase("test1<br>test2<br>test3", "test1\ntest2\ntest3")]
// table
[TestCase("<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>", "1\t2\n3\t4")]
[TestCase("<table><tr><td>1</td> <td>2</td></tr> <tr><td>3</td> <td>4</td></tr></table>", "1\t2\n3\t4")]
[TestCase("<table><tr><td>1</td><td>2</td></tr><tr><td><table><tr><td>3</td><td>4</td></tr></table></td><td>5</td></tr></table>", "1\t2\n\n3\t4\n\t5")]
// select
[TestCase("<select><option>test1</option><option>test2</option></select>", "test1\ntest2")]
Expand Down
4 changes: 2 additions & 2 deletions src/AngleSharp.Css/Extensions/ElementExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private static void ItcInCssBox(ICssStyleDeclaration elementStyle, ICssStyleDecl
}
else if (elementStyle is not null && ((node is IHtmlTableCellElement && String.IsNullOrEmpty(elementStyle.GetDisplay())) || elementStyle.GetDisplay() == CssKeywords.TableCell))
{
if (node.NextSibling is IElement nextSibling)
if (((IElement)node).NextElementSibling is IElement nextSibling)
{
var nextSiblingCss = nextSibling.ComputeCurrentStyle();

Expand All @@ -216,7 +216,7 @@ private static void ItcInCssBox(ICssStyleDeclaration elementStyle, ICssStyleDecl
}
else if (elementStyle is not null && ((node is IHtmlTableRowElement && String.IsNullOrEmpty(elementStyle.GetDisplay())) || elementStyle.GetDisplay() == CssKeywords.TableRow))
{
if (node.NextSibling is IElement nextSibling)
if (((IElement)node).NextElementSibling is IElement nextSibling)
{
var nextSiblingCss = nextSibling.ComputeCurrentStyle();

Expand Down
Loading