Open njlr opened 1 week ago
Nope, seems like a bug to me. Might be worth adding a test case and seeing how this function fares: https://github.com/fsprojects/FSharp.Data/blob/main/src/FSharp.Data.Html.Core/HtmlNode.fs#L115-L174
I have created a test-case and made a potential fix here: https://github.com/fsprojects/FSharp.Data/pull/1510
However, I'm not sure if the logic is correct for all cases - are pre
tags special in HTML?
Yeah, they're meant to preserve whatever formatting is within them (non-html syntax). In this case we're not respecting that.
I have some HTML that Firefox renders like this:
If I "round-trip" this in
FSharp.Data
, then the output renders like this:Here is the HTML:
Here is a repro script:
Maybe I have missed something?