You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason, it looks to me like relativeTo() returns unexpected results when the first URI is a strict descendant of the second. For example, I would have expected this to work:
>>> new URI('/base/path/with/subdir/inner.html').relativeTo('/base/path/top.html').toString()
"./with/subdir/inner.html"
Instead, I get this result which seems wrong to me:
>>> new URI('/base/path/with/subdir/inner.html').relativeTo('/base/path/top.html').toString()
"./inner.html"
Reversing them, however, works as expected:
>>> new URI('/base/path/top.html').relativeTo('/base/path/with/subdir/inner.html').toString()
"../../top.html"
Is this a bug, or am I misusing the method in some way? Is this something relativeTo() should be expected to support?
The text was updated successfully, but these errors were encountered:
For some reason, it looks to me like
relativeTo()
returns unexpected results when the first URI is a strict descendant of the second. For example, I would have expected this to work:Instead, I get this result which seems wrong to me:
Reversing them, however, works as expected:
Is this a bug, or am I misusing the method in some way? Is this something
relativeTo()
should be expected to support?The text was updated successfully, but these errors were encountered: