markmv - v1.26.2
    Preparing search index...

    Class LinkRefactorer

    Refactors and updates markdown links when files are moved or restructured.

    The LinkRefactorer automatically updates link paths, maintains referential integrity, and handles various link types including relative paths, absolute paths, and Claude import syntax. It ensures that links remain valid after file operations.

    Basic link refactoring

    const refactorer = new LinkRefactorer({
    preferRelativePaths: true,
    updateClaudeImports: true
    });

    const result = await refactorer.refactorLinks(
    parsedFile,
    'old/path/file.md',
    'new/path/file.md'
    );

    console.log(`Updated ${result.changes.length} links`);

    Bulk refactoring with path mapping

    const pathMap = new Map([
    ['docs/old.md', 'guides/new.md'],
    ['api/legacy.md', 'reference/current.md']
    ]);

    const result = await refactorer.refactorLinksWithMapping(
    parsedFile,
    pathMap
    );
    Index

    Constructors

    Methods