Skip to main content

Local-file links not working

Completed

Comments

3 comments

  • Fletcher Penney

    It seems like there are a couple of issues here (or perhaps you were just experimenting).

     

    1.  You seem to be conflating http links with file links.   `[foo](bar)` is an HTTP protocol link, not a file link.

     

    2. File protocol links (`[foo](file:///foo/bar)`) require a handler that is capable of accessing the resource.  Web browsers can generally do this.  The editor hands the URL off to macOS, which can handle it (assuming it is properly formed).

     

    3. The preview pane is different.  For a variety of reasons, the preview pane has to be limited.  It cannot navigate outside of the previewed page, so links to other URLs will be sent off to your web browser (e.g. `http://google.com/`).  But file links don't work like that, presumably since the browser cannot itself open a file URL and would simply pass it back off to the OS, so they don't seem to work from the preview.  I suspect there is nothing I can do to change this behavior, but will keep an eye out.

     

    Ultimately,  the preview is just that.  A preview.  To test full functionality of your HTML output, you will need to try it in a browser.

    1
  • theofrancis

    Got it. Thanks. What threw me is that it worked in the editor. Is there a format for file links in MultiMarkdown? I guess I was thinking of them as a kind of fully expanded wiki link — just specifying the full path instead of one relative to the file in view.

    0
  • Fletcher Penney

    File links are handled like any other URL, but you have to include the protocol (e.g. `file:///`), otherwise http will generally be assumed.

     

    WikiLinks are entirely different -- `[[foo]]` is an instruction to nvUltra, **NOT** MultiMarkdown, to treat this as a link to another file within the currently open Notebook/Window.  WikiLinks have no meaning as far as MultiMarkdown is concerned.

    1

Please sign in to leave a comment.

Powered by Zendesk