Dream-html is a library for generating HTML, closely integrated with Dream. It can be used as an alternative to Dream’s built-in Embedded ML templating language and comes with all current htmx attributes defined out of the box.
In this release, I made a few breaking changes (hence major version bump):
Raise exceptions on path parameter parse errors: instead of responding with 400 Bad Request. This allows you to hook in your own custom response by catching the parse exception.
Remove unused form decoder error keys: specifically error_expected_int32 and error_expected_int64 which are already covered by error_expected_int.
Finally, revert to the previous style of HTML generation, breaking lines at the start of each attribute instead of pretty-printing the HTML with indentation. This is done for performance reasons.
Fixes:
Router matching on encoded values, eg /accounts/%F0%9F%91%8D/versions/1 is now able to extract the second segment, 👍.
New additions:
Invoker API attributes
Some more SVG elements
Finally, raised the minimum supported OCaml version to 5.3.0 because of ppxlib.
Ah okay! Unless I am missing something, that announcement is not indicating that you need a lower bound on OCaml 5.3. Sorry if it was misleading.
Instead, it is saying from ppxlib.0.36.0 the ppxlib API will use the OCaml 5.2.0 parsetree. Ppxlib provides migrations so that older and newer versions of the compiler will work with the 5.2.0 parsetree. When we did this change we decided it caused too much chaos in the ecosystem and have since resolved to not bumping the internal parsetree on any minor patch release.
I just checked out dream-html from your git repository and built it (with tests) using ppxlib.0.38.0 on OCaml 4.14.2 – I think you should be able to relax that constraint!