Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using right-click "Open [thing]" menu does not work to open Markdown files with relative URLs #6634

Open
johnmarkschofield opened this issue Mar 9, 2025 · 0 comments

Comments

@johnmarkschofield
Copy link

johnmarkschofield commented Mar 9, 2025

Description of the bug

When I am editing a Markdown file and I right-click a link that points to a second Markdown file, and then select "Open [URL]," from the right-click menu, Sublime Text reports "The Application can't be opened -50"

In MacOS, I have associated the .md extension with Sublime Text (double-clicking an *.md file in the finder opens it in Sublime Text.)

Steps to reproduce

  1. Open a Markdown file that contains links to other Markdown files, in the same folder or in child folders.
  2. Right-click a markdown link to a local markdown file and select "Open [FILEPATH]"
  3. Observe the pop-up message saying that "the application can't be opened."

If the file path is fully-qualified (starting at root) and you prefix it with the "file://" scheme, then and only then does it work. Relative paths, with or without "file://," do not work.

Example:

# This is doc1
## This section contains links to doc2
*doc1.md and doc2.md are in the same folder*

### This does not work
[Doc 2](doc2.md) BAD
[Doc 2](./doc2.md) BAD
[Doc 2](/Users/johnschofield/code/schof/test/doc2.md) BAD
[Doc 2](file://doc2.md) BAD

### This works
[Doc 2](file:///Users/johnschofield/code/schof/test/doc2.md) OK

Expected behavior

My expectation is that, in the situation above, after selecting the "Open [...]" menu option, on a link to a local file, Sublime Text would open that file for editing.

If the path to the Markdown file was incorrect, I would expect Sublime Text to tell me that it can not locate the file, rather than an error message that does not apply. (I'm not trying to open an application.)

Actual behavior

Image

Sublime Text build number

4192

Operating system & version

MacOS Sequoia 15.3.1

(Linux) Desktop environment and/or window manager

n/a/

Additional information

I replicated this with no packages installed except for Package Control.

OpenGL context information


@johnmarkschofield johnmarkschofield changed the title Using right-click "open [thing]" menu does not work to open markdown files. Using right-click "Open [thing]" menu does not work to open Markdown files. Mar 10, 2025
@johnmarkschofield johnmarkschofield changed the title Using right-click "Open [thing]" menu does not work to open Markdown files. Using right-click "Open [thing]" menu does not work to open Markdown files with relative URLs Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant