mergeDuplicateLevels

fun mergeDuplicateLevels()

Merges duplicate path levels.

For example, merge the path 'foo.bar.foo.bar.baz' with duplicate levels as 'foo.bar.baz'. But if they are not connected, just like foo.bar.break.foo.bar.baz, it will not merge.