Closed vallentin closed 3 years ago
Thanks for the report. This should be fixed with Version 1.2.0
.
Feel free to reopen if the issue remains.
I must say, given that the last release was 2 years ago. I'm quite impressed and thankful, that you fixed it within just hours! Thanks a lot!
The new release does indeed (visually) render correctly now. For constructive feedback, too much whitespace remains in some cases. But honestly, I'd rather have too much whitespace than too little.
Yeah that's unfortunately correct. However, it is very hard to detect whether a given white space should be removed or not. If you have idea's feel free to share and I'll think about it.
One idea would be to remove white spaces between >
and <
but even that would be wrong in corner cases like
<b>test</b> <b>test</b>
. So for now I think this is the best solution.
I have one idea for a specific case, though note that I didn't look at your implementation, so I don't really know if it's feasible to do.
If you know whether you're inside the <head>
vs <body>
. Then if inside the <head>
you wouldn't need to retain all whitespace.
Whitespace seems to be removed incorrectly between some inline elements.
Minimal, Reproducible Example
Expected:
_Based on MDN._
Actual:
Which makes it visually render as
"FooBarBaz"
instead of"Foo Bar Baz"
.