Skip to content

Markdown: Allow to open files inside the editor that are linked from the markdown #989

Closed

Description

@Enet4

The current behaviour of Code's Markdown previewer when clicking a relative link is actually a bit cryptic: it attempts to open the file relative to the user's home path with the system's application of choice. This will commonly lead to errors being dispatched because the file cannot be found.

If I have the following Markdown:

The data types are documented [here](typings/foo.d.ts).

Clicking the link will make my system attempt to open /home/username/typings/foo.d.ts.

Given that even GitHub supports relative links to project files, I strongly believe that they should be supported here. Such links should instead be relative to the markdown file's directory and open the linked file using the Code editor.

Activity

  1. added
    bug
    on Dec 4, 2015
  2. changed the title [-]Relative links in Markdown preview are improperly handled[/-] [+]Markdown: Allow to open files inside the editor that are linked from the markdown[/+] on Dec 4, 2015
  3. added
    feature-request
    and removed
    bug
    on Dec 4, 2015
  4. removed this from the Backlog milestone on Dec 4, 2015
  5. RWeigelt commented on Dec 6, 2015

    @RWeigelt

    +1; opening markdown files by clicking a (relative) link in the preview would be a very powerful feature both for writing developer documentation (split into individual files by topic) for a project, but also for viewing that documentation.

  6. added
    markdown-ext
    and removed on Dec 18, 2015
  7. noelleleigh commented on Oct 14, 2016

    @noelleleigh

    Related: The markdown-it library that vscode uses stops file:// links from being being built.

    Is this behavior something vscode could change for its markdown preview?

  8. added a commit that references this issue on Jan 20, 2017
    f783948
  9. added a commit that references this issue on Jan 20, 2017
    d85dc99
  10. locked and limited conversation to collaborators on Nov 18, 2017
  11. added a commit that references this issue on Sep 6, 2026
    7a2c506
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestmarkdown-ext

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions