FileMaker Data API Tools API - v1.8.0
    Preparing search index...

    Function applyMarkerSection

    • Puts wrapped (content already between the start and end markers) into existing:

      • no file, or an empty file: the new text is the file;
      • one well-formed marker pair: only that section is replaced, the rest is kept byte for byte;
      • no markers: throws MarkersMissingError unless allowAppend, which adds the section at the end;
      • anything else (a lone marker, two sections, reversed markers): refused, nothing guessed.

      Parameters

      • existing: string | undefined
      • wrappedText: string
      • allowAppend: boolean

      Returns { text: string; mode: SectionWriteMode }