text-visual-diff
    Preparing search index...

    Interface HighlightOptions

    Options for customising the HTML tags and CSS classes used for highlighting.

    Every option is optional — omitting it falls back to a <mark> element with the default class name.

    interface HighlightOptions {
        addedClass?: string;
        addedTag?: string;
        matchedClass?: string;
        matchedTag?: string;
        showWhitespaceDiffs?: boolean;
        unmatchedClass?: string;
        unmatchedTag?: string;
    }
    Index

    Properties

    addedClass?: string

    CSS class name for added regions (target-side). Defaults to "diff-added".

    addedTag?: string

    HTML tag name for added regions (target-side). Defaults to "mark".

    matchedClass?: string

    CSS class name for matched regions. Defaults to "diff-matched".

    matchedTag?: string

    HTML tag name for matched regions. Defaults to "mark".

    showWhitespaceDiffs?: boolean

    When true, whitespace-only deletions and insertions are highlighted. When false (default), whitespace-only diffs are silently ignored.

    unmatchedClass?: string

    CSS class name for unmatched (removed) regions. Defaults to "diff-unmatched".

    unmatchedTag?: string

    HTML tag name for unmatched (removed) regions. Defaults to "mark".