Convenience function that re-parses the files an operation modified or created (those that still exist on disk) and checks that every link in them resolves. A validation failure is reported in the result rather than thrown.
The operation result to validate
Promise resolving to the validity flag, the number of broken links and a message for each
import { moveFile, validateOperation } from 'markmv';const result = await moveFile('old.md', 'new.md');const validation = await validateOperation(result);if (!validation.valid) {console.error(`Found ${validation.brokenLinks} broken links`);} Copy
import { moveFile, validateOperation } from 'markmv';const result = await moveFile('old.md', 'new.md');const validation = await validateOperation(result);if (!validation.valid) {console.error(`Found ${validation.brokenLinks} broken links`);}
Convenience function that re-parses the files an operation modified or created (those that still exist on disk) and checks that every link in them resolves. A validation failure is reported in the result rather than thrown.