fix: extract footnote and reference-style URLs in seeAlsoLinks
Build & Deploy / build-and-deploy (push) Has been cancelled
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:
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user