The HtmxResponse currently stores its templates inside a Set, so the order is not preserved. Although stated differently in the docs of HTMX, the order might be relevant in some edge-cases, see https://github.com/bigskysoftware/htmx/issues/1198.
I'd therefore suggest to change the implementeion to use a LinkedHashSet instead of a HashSet, it seems also more intuitive when debugging the generated responses.
The
HtmxResponse
currently stores its templates inside aSet
, so the order is not preserved. Although stated differently in the docs of HTMX, the order might be relevant in some edge-cases, see https://github.com/bigskysoftware/htmx/issues/1198.I'd therefore suggest to change the implementeion to use a
LinkedHashSet
instead of aHashSet
, it seems also more intuitive when debugging the generated responses.