Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected blank lines #52

Open
devkcirtap opened this issue Apr 2, 2024 · 0 comments
Open

Unexpected blank lines #52

devkcirtap opened this issue Apr 2, 2024 · 0 comments

Comments

@devkcirtap
Copy link

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
current_result

Expected result:
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant