// The patch notes: the latest game release in full, the ones before it folded. Shared by // build.mjs (baked into the page) and main.js (refreshed from GitHub). import { markdown, escape } from "./markdown.js"; const REPO = "ludovic111/horizon"; // "Horizon 2026.10.13: 100% of harnessed vanilla parity" reads as the version and its line. function parts(r) { const version = r.tag_name.replace(/^v/, ""); const name = r.name || ""; const line = name.includes(": ") ? name.slice(name.indexOf(": ") + 2) : name.replace(/^Horizon\s*/, "").replace(version, "").trim(); return { version, line: line.charAt(0).toUpperCase() + line.slice(1), date: (r.published_at || "").slice(0, 10) }; } export function releasesHtml(list) { if (!list.length) return ""; const [latest, ...older] = list; const l = parts(latest); const head = `

Latest release

${escape(l.version)}

${l.line ? `

${escape(l.line)}

` : ""} Downloads and full notes
${markdown(latest.body || "")}
`; const rest = older .map((r) => { const o = parts(r); return `
${escape(o.version)}${escape(o.line)}
${markdown(r.body || "")}

Downloads and full notes on GitHub

`; }) .join(""); return `${head}
${rest ? `

Earlier releases

${rest}` : ""}

Every release on GitHub

`; }