@karmaniverous/jeeves
    Preparing search index...

    Function upsertManagedBlock

    • Insert or replace the managed block in file content.

      Parameters

      • fileContent: string

        Existing file content (empty string for a new file).

      • markers: ManagedMarkers

        Marker set.

      • body: string

        Managed body (Markdown).

      • stamp: ManagedBlockStampOptions

        Version stamp options.

      Returns string

      The new file content.

      If a block with these markers exists, it is replaced in place. Otherwise the block is inserted at markers.position (default 'top'), and any orphaned BEGIN marker of the same type is stripped from user content so it cannot pair with the new END marker later.