From 70333540116497bfb35e011fb43fea1d27d73dee Mon Sep 17 00:00:00 2001 From: Archicratia Date: Thu, 26 Mar 2026 21:29:26 +0100 Subject: [PATCH] fix(glossaire): include standalone relation headings in reading follow --- src/layouts/EditionLayout.astro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/layouts/EditionLayout.astro b/src/layouts/EditionLayout.astro index 6c7140d..a701fd4 100644 --- a/src/layouts/EditionLayout.astro +++ b/src/layouts/EditionLayout.astro @@ -1500,6 +1500,7 @@ const WHOAMI_FORCE_LOCALHOST = (import.meta.env.PUBLIC_WHOAMI_FORCE_LOCALHOST ?? .filter(Boolean); const h2Plain = Array.from(reading.querySelectorAll("h2[id]")) + .filter((h2) => !h2.closest("details.details-section")) .map((h2) => ({ id: h2.id, anchor: h2, @@ -1508,7 +1509,7 @@ const WHOAMI_FORCE_LOCALHOST = (import.meta.env.PUBLIC_WHOAMI_FORCE_LOCALHOST ?? h2, })); - const H2 = (h2Anchors.length ? h2Anchors : h2Plain) + const H2 = [...h2Anchors, ...h2Plain] .slice() .sort((a, b) => absTop(a.marker) - absTop(b.marker));