Avalonia.HtmlRenderer
Avalonia.HtmlRenderer copied to clipboard
Unexpected blank lines
First of all, I would like to thank you for this great library.
When rendering this simple HTML code
<html>
<body>
<p><b>Line 1</b><br><b>Line 2</b><br><b>Line 3</b><br><b>Line 4</b></p>
</body>
</html>
the result looks like
Expected result:
If I change the block
else if (box.Boxes[i].IsBlock)
{
followingBlock = true;
}
in the CorrectLineBreaksBlocks method of DomParser.cs to
else if (box.Boxes[i].IsBlock && !box.Boxes[i].IsBrElement)
{
followingBlock = true;
}
it works, at least for my use case.