wdpr
    Preparing search index...
    • Create a new element with all child element arrays transformed by a function.

      This is a structural mapper that knows how to find child element arrays in all AST node types (list items, table cells, definition list keys/values, tab panels, and generic data.elements). The transform function receives each child array and returns a new array; the original element is not mutated.

      If the element has no children, it is returned unchanged (same reference).

      Parameters

      • element: Element

        The element whose children should be transformed

      • transform: (elements: Element[]) => Element[]

        Function that receives a child element array and returns a transformed array

      Returns Element

      A new element with transformed children, or the original element if it has no children