markmv - v1.26.2
    Preparing search index...

    Interface BrokenLink

    Represents a broken or invalid link found during validation.

    Contains detailed information about the link, where it was found, and why it's considered broken. Used for reporting and debugging link integrity issues.

    Handling broken links

    const brokenLinks: BrokenLink[] = validationResult.brokenLinks;

    brokenLinks.forEach(broken => {
    console.log(`${broken.sourceFile}:`);
    console.log(` Link: ${broken.link.href}`);
    console.log(` Reason: ${broken.reason}`);
    if (broken.details) {
    console.log(` Details: ${broken.details}`);
    }
    });
    interface BrokenLink {
        sourceFile: string;
        link: MarkdownLink;
        reason:
            | "file-not-found"
            | "external-error"
            | "invalid-format"
            | "circular-reference";
        details?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    sourceFile: string

    File containing the broken link

    The broken link

    reason:
        | "file-not-found"
        | "external-error"
        | "invalid-format"
        | "circular-reference"

    Reason the link is broken

    details?: string

    Additional error details