TEMPL_SYNTAX_BASELINE
ghtmx is a hard fork of templ. Per FR-004, the
.ghtmx language surface is a syntactic superset of the templ syntax at the
pinned baseline below, with two documented semantic carve-outs.
| Field | Value |
|---|---|
| Upstream repository | https://github.com/a-h/templ |
| Pinned commit | 04abee5364c6fab2bde8c00d215fdcb630ad6a94 |
| Nearest tag | v0.3.1020 (baseline is 36 commits after this tag) |
| Fork date | 2026-07-31 |
Carve-outs (FR-004)
Constructs valid at the baseline that ghtmx deliberately reinterprets:
hx-*attributes are typed bindings. The five verb attributes (hx-get,hx-post,hx-put,hx-patch,hx-delete) accept a Go handler symbol or a generated route constructor call, not an arbitrary string or expression. Arbitrary values produceGHTMX-E0601/GHTMX-E0602diagnostics naming the replacement construct. Otherhx-*attributes are validated against the pinned htmx version's attribute surface.- URL-context escaping at route-binding sites is engine-determined. The escaping context is derived from the attribute's declared type and is not author-selectable at the binding site.
The conformance corpus (ported from the baseline's parser, formatter, and
generator test suites) is the executable form of this guarantee: every
non-excluded case must parse and render equivalently. The corpus inventory
and the itemized exclusion list live in CONFORMANCE.md.