fix: extract footnote and reference-style URLs in seeAlsoLinks
Build & Deploy / build-and-deploy (push) Has been cancelled

Bare URLs in footnote definitions ([^1]: https://...) and reference-style
link definitions ([label]: https://...) were not captured by the existing
inline-link regex. Added a second pass with a multiline regex.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
svemagie
2026-04-15 10:43:17 +02:00
parent 424c3d3909
commit 3a4e6f1f06
+4
View File
@@ -1400,6 +1400,10 @@ export default function (eleventyConfig) {
const re = new RegExp(`(?<!!)\\]\\((${escaped}/[^)\\s]+)\\)`, "g");
let m;
while ((m = re.exec(content)) !== null) add(m[1]);
// Also extract reference-style link definitions and bare footnote URLs:
// [^1]: https://blog.giersig.eu/... or [label]: https://blog.giersig.eu/...
const reRef = new RegExp(`^\\[[^\\]]+\\]:\\s+(${escaped}/[^\\s]+)`, "gm");
while ((m = reRef.exec(content)) !== null) add(m[1]);
} catch { /* ignore */ }
return result;
});