> I find this an interesting puzzle.  Question:  what would this return:
> 
>    collapse_path("b/c/f", "/a/b/c/d/e/b/c/g/h")
>    #^^^^^^^^^^^^ or whatever :-)

At the moment, I'm thinking it should be:

  /a/b/c/d/e/b/c/f

(which could probably be gathered from my other recent post :)

Probably, this won't happen too often in my application.

I'm attempting to put full hierarchy support into a home-grown wiki I've
written. If I'm on page /a/b/c/d/e/b/c/g/h, and I type b/c/f (assuming all
single letters are valid WikiNames), then which b/c should it climb up to?
I'm thinking I'd like it to assume the 'closest' one, giving
/a/b/c/d/e/b/c/f

For example (it's a lousy one, but hey it didn't cost you nothin'), given
these pages:

/MyProject/ToDo/CrossProjectRefactor/MyProject/ModuleA
/MyProject/ToDo/CrossProjectRefactor/MyProject/ModuleB
/MyProject/ToDo/CrossProjectRefactor/YourProject/ModuleA

I'm on this page:

  /MyProject/ToDo/CrossProjectRefactor/MyProject/ModuleB

and want to enter a link to:

  /MyProject/ToDo/CrossProjectRefactor/MyProject/ModuleA

... I'd like to be able to type:

  MyProject/ModuleA

Having it climb up to 

  /MyProject/ModuleA

... seems unnatural.

Chris