Skip to content

Commit 6ad8b18

Browse files
author
ArthurHub
committed
Fix parsing error with element containing psedo class and style
1 parent 5628ff6 commit 6ad8b18

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Source/HtmlRenderer/Parse/DomParser.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ private static void CascadeStyles(CssBox box, HtmlContainer htmlContainer, ref C
102102
if (box.HtmlTag.HasAttribute("style"))
103103
{
104104
var block = CssParser.ParseCssBlock(box.HtmlTag.Name, box.HtmlTag.TryGetAttribute("style"));
105-
AssignCssBlock(box, block);
105+
if(block != null)
106+
AssignCssBlock(box, block);
106107
}
107108

108109
// Check for the <style> tag

0 commit comments

Comments
 (0)