@mintlify/prebuild 1.0.1320 → 1.0.1322
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -446,7 +446,10 @@ export async function loadSdkReferenceSource(config, contentDirectoryPath, remot
|
|
|
446
446
|
return generateSdkReference(format, realSourcePath);
|
|
447
447
|
}
|
|
448
448
|
function prefixInternalLinks(content, directory, slugs) {
|
|
449
|
-
|
|
449
|
+
const prefix = (target) => slugs.has(target) ? path.posix.join(directory, target) : target;
|
|
450
|
+
return content
|
|
451
|
+
.replace(/\]\(\/([^)#\s]+)((?:#[^)\s]*)?)\)/g, (_, target, fragment) => `](/${prefix(target)}${fragment})`)
|
|
452
|
+
.replace(/typeHref=\{"\/([^"#]+)((?:#[^"]*)?)"\}/g, (_, target, fragment) => `typeHref={"/${prefix(target)}${fragment}"}`);
|
|
450
453
|
}
|
|
451
454
|
function assertSafeSlug(slug, config) {
|
|
452
455
|
const segments = slug.split('/');
|