markmv - v1.26.2
    Preparing search index...

    Class PrependMergeStrategy

    Merge strategy that prepends source content to the beginning of target content.

    Adds the source file content to the beginning of the target file, after any frontmatter. This is useful when you want new content to appear first in the document.

    Prepend merge with custom separator

    const strategy = new PrependMergeStrategy({
    separator: '\n\n<!-- New Content Above -->\n\n',
    mergeFrontmatter: true
    });

    const result = await strategy.merge(targetContent, sourceContent, 'target.md', 'source.md');
    console.log('Source content prepended to target');

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    • Find potential header conflicts between target and source

      Parameters

      • targetContent: string
      • sourceContent: string

      Returns { header: string; targetLine: number; sourceLine: number }[]