diff --git a/bin/elc-linux-amd64 b/bin/elc-linux-amd64 index 22d9783..375aeb6 100755 Binary files a/bin/elc-linux-amd64 and b/bin/elc-linux-amd64 differ diff --git a/dist/web_stubs.c b/dist/web_stubs.c index fb6bbc0..a5f70ec 100644 --- a/dist/web_stubs.c +++ b/dist/web_stubs.c @@ -325,3 +325,9 @@ el_val_t gcs_read(el_val_t bucket, el_val_t object_name) { if (!resp) return EL_STR(""); return resp; } + +/* Browser JS interop stubs — server-side no-ops for checkout.el browser globals. + * checkout.el contains JS inline: window.neuronCheckoutFree&&window.neuronCheckoutFree() + * which the El HTML parser exposes as C identifiers in the generated checkout.c. */ +el_val_t window = 0; +el_val_t neuronCheckoutFree(el_val_t v) { (void)v; return 0; } diff --git a/manifest.el b/manifest.el index e7960e4..23836a4 100644 --- a/manifest.el +++ b/manifest.el @@ -9,4 +9,6 @@ build { target "release" entry "src/main.el" output "dist/" + c_source "dist/web_stubs.c" + c_source "dist/vessel_stubs.c" } diff --git a/src/gallery.el b/src/gallery.el index eb7d0f2..9f4d473 100644 --- a/src/gallery.el +++ b/src/gallery.el @@ -12,9 +12,9 @@ // anchors, which the HTML5 parser resolves via the adoption agency algorithm, // producing mismatched tags that break gallery-grid's closing tag and // pull sibling elements into the grid as spurious grid items. -let gallery_share_allowlist: String = "{\"p\":[],\"br\":[],\"strong\":[],\"em\":[],\"u\":[],\"s\":[],\"code\":[],\"pre\":[],\"ul\":[],\"ol\":[],\"li\":[],\"h1\":[],\"h2\":[],\"h3\":[],\"h4\":[],\"blockquote\":[]}" - fn gallery_page(cards_json: String, supabase_url: String, supabase_anon_key: String) -> String { + // Moved from module-level to avoid duplicate main() when linked with other modules. + let gallery_share_allowlist: String = "{\"p\":[],\"br\":[],\"strong\":[],\"em\":[],\"u\":[],\"s\":[],\"code\":[],\"pre\":[],\"ul\":[],\"ol\":[],\"li\":[],\"h1\":[],\"h2\":[],\"h3\":[],\"h4\":[],\"blockquote\":[]}" let i: Int = 0 let cards_html: String = "" let n: Int = json_array_len(cards_json)