build: rebuild dist with multi-segment path fix

This commit is contained in:
saberzero1 2026-03-22 12:20:49 +01:00
parent 1ad4e4f2f6
commit 8d2e14bcb9
No known key found for this signature in database
4 changed files with 26 additions and 2 deletions

12
dist/index.js vendored
View file

@ -160,7 +160,19 @@ function transformLink(src, target, opts) {
const canonicalSlug = stripSlashes(targetSlug.slice(".".length));
const [targetCanonical, targetAnchor] = splitAnchor(canonicalSlug);
if (opts.strategy === "shortest") {
const isMultiSegment = targetCanonical.includes("/");
const isFolderTarget = isFolderPath(targetSlug);
const matchingFileNames = opts.allSlugs.filter((slug) => {
if (isMultiSegment) {
if (slug === targetCanonical || slug.endsWith("/" + targetCanonical)) {
return true;
}
if (isFolderTarget) {
const withIndex = targetCanonical + "/index";
return slug === withIndex || slug.endsWith("/" + withIndex);
}
return false;
}
const parts = slug.split("/");
const fileName = parts.at(-1);
return targetCanonical === fileName;

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

12
dist/path.js vendored
View file

@ -157,7 +157,19 @@ function transformLink(src, target, opts) {
const canonicalSlug = stripSlashes(targetSlug.slice(".".length));
const [targetCanonical, targetAnchor] = splitAnchor(canonicalSlug);
if (opts.strategy === "shortest") {
const isMultiSegment = targetCanonical.includes("/");
const isFolderTarget = isFolderPath(targetSlug);
const matchingFileNames = opts.allSlugs.filter((slug) => {
if (isMultiSegment) {
if (slug === targetCanonical || slug.endsWith("/" + targetCanonical)) {
return true;
}
if (isFolderTarget) {
const withIndex = targetCanonical + "/index";
return slug === withIndex || slug.endsWith("/" + withIndex);
}
return false;
}
const parts = slug.split("/");
const fileName = parts.at(-1);
return targetCanonical === fileName;

2
dist/path.js.map vendored

File diff suppressed because one or more lines are too long