Skip to content

Cannot navigate to sub-path #539

Open
@zampino

Description

@zampino

Assume we're showing a notebook at URL path /notebooks/my-ns and this has a link to /notebooks/my-ns/sub. Following the link redirects to the index.

This is because we intercept the anchor click and navigate to /sub which doesn't exist. This is due to

(defn ->doc-url [url]
(let [path (js/decodeURI (.-pathname url))
doc-path (js/decodeURI (.-pathname (.-location js/document)))]
(if (str/starts-with? path doc-path)
(subs path (count doc-path))
(subs path 1))))

I can't see why we need to produce relative paths in the click handler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions