Fix superfluous newline in html formatting

Every page is formatted in a div, and when the div closes it creates a newline in the html rendering.
In order to fix this a newline is now removed whenever the div is closed (if there are any newlines waiting to be rendered).
This commit is contained in:
Roni Jacobson
2026-07-31 18:59:47 +03:00
parent 4d605bf0d8
commit f024d21fc4

View File

@@ -1354,6 +1354,9 @@ pub const PageFormatter = struct {
closing.len,
);
}
// Closing the div creates a newline in the output
// so make sure to create one less newline
if (blank_rows >= 1) blank_rows -= 1;
}
return .{ .rows = blank_rows, .cells = blank_cells };