public function replace(FluentDOM\Query $fd): \FluentDOM\Query {
    $fd
      ->find('descendant-or-self::text()')
      ->each([$this, 'replaceNode']);
    return $fd->spawn();
  }
public function replace(FluentDOM\Query $fd): \FluentDOM\Query {
    $fd
      ->find('descendant-or-self::text()')
      ->each([$this, 'replaceNode']);
    return $fd->spawn();
  }
public function replace ( FluentDOM \ Query $ fd ) : \ FluentDOM \ Query { $ fd -> find ( 'descendant-or-self::text()' ) -> each ( [ $ this , 'replaceNode' ] ) ; return $ fd -> spawn ( ) ; }
Replace markup in all text nodes inside the current selection

@param FluentDOM\Query $fd
@return FluentDOM\Query
Replace markup in all text nodes inside the current selection