docs-site: fix link migration
This commit is contained in:
@@ -13,7 +13,7 @@ export default function remarkLinkMigration() {
|
||||
return;
|
||||
}
|
||||
// Skip external links, links pointing to /docs already and anchors
|
||||
if (!node.url || /^(https?:)?\/\/|^#/.test(node.url)) return;
|
||||
if (!node.url || /^(https?:)?\/\/|mailto:|^#/.test(node.url)) return;
|
||||
|
||||
// Remove repeated leading ../ or ./
|
||||
const cleanUrl = node.url.replace(/^\.\.?|((\.\.?)\/)+|\.md$/g, "");
|
||||
|
||||
Reference in New Issue
Block a user