merge syncs into a array of non-overlapping spans