mergeByPath

fun mergeByPath(path: List<Int>)

Merges the element node at the given path into its left sibling.

The children of the node at path are moved into the preceding sibling, then the now-empty node is deleted. Only element nodes can be merged; merging a text node throws YorkieException. The node must have a left sibling (i.e., it cannot be the first child).

Throws

if path is empty, resolves to a text node, or resolves to the first child (no left sibling).