-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Mark Text doesn't open link to non markdown files #2396
Comments
Do you want a relative link to appear in a PDF document? |
I am not sure what you mean by this. The expected behaviour would be that when clicking on the link (cmd + click, more precisely), the pdf file would be opened in the default app. |
Perhaps your expectation is accurate for links given as a fully-qualified URL to a web page. Your example takes the form of a path to a file on your local system, whereas PDF documents are generally, and by design, standalone, or self contained. I would not personally expect any PDF to feature a link that is relative, or as in the form of your example (and despite my earlier incorrect characterization) absolute but local to some system. One question is whether you do get the desired behavior if you use a full URL (e.g. |
Hi,
The behavior I’m describing is the default one currently in Typora, and this would be expected given that links to markdown files are opened on Mark Text too (cmd + click on a ‘[name](nametomarkdown.md)’ does open the file).
Maybe I’m not describing well what I’m thinking but I am not referring to opening the PDF file in Mark
text. Simply opening the linked file in the default PDF app.
Raphaël
Le 22 nov. 2020 à 00:04 +0100, brainchild0 <notifications@github.com>, a écrit :
… Perhaps your expectation is accurate for links given as a fully-qualified URL to a web page. Your example takes the form of a path to a file on your local system, whereas PDF documents are generally, and by design, standalone, or self contained.
I would not personally expect any PDF to feature a link that is relative, or as in the form of your example (and despite my earlier incorrect characterization) absolute but local to some system.
One question is whether you do get the desired behavior if you use a full URL (e.g. https://www.github.com. (A second question whether, if the first answer is affirmative, then whether you really do believe that a bug or useful enhancement has been identified.)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I think I understand, but it appears to me that for this feature, separate from what Typora might do, whether by design or accident, the current behavior might be more desirable. If you attach a PDF file for example to an e-mail message, then the local link is not available to the recipient. PDF documents are by design generally standalone, for example, with respect to media being embedded, and similarly, I tend to expect that links will be limited to fully-qualified URIs. Perhaps describing a full use case would bring better light to the subject. |
I understand your point but obviously we can’t attach PDF files to markdown files, so the only option is to insert path to files. Also, what is the point of being able to adding path to files (which is standard markdown, I believe) if you can’t open them?
Raphaël
Le 22 nov. 2020 à 01:20 +0100, brainchild0 <notifications@github.com>, a écrit :
… > Simply opening the linked file in the default PDF app.
I think I understand, but it appears to me that for this feature, separate from what Typora might do, whether by design or accident, the current behavior might be more desirable. If you attach a PDF file for example to an e-mail message, then the local link is not available to the recipient. PDF documents are by design generally standalone, for example, with respect to media being embedded, and similarly, I tend to expect that links will be limited to fully-qualified URIs.
Perhaps describing a full use case would bring better light to the subject.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Maybe I have misunderstood. Are you referring to issues in PDF documents generated by the application from Markdown, or links to PDF documents in the Markdown editor? |
Links to PDF documents in the Markdown editor. Maybe I'll be clearer if I explain my workflow more precisely:
|
I see. Unfortunately, I misunderstood the original problem. However, I am still wondering whether many of the same observations are relevant. Creating a Markdown document that is tied to the layout of a local system seems very unfamiliar to me, even if Typora allows the specific behavior. |
@raphaelhuleux Thanks for creating this issue. There's currently no handler implemented for local I'm thinking of the following: Open a local relative path iff the document/file is saved or an absolute path if the file exists on disk and it's safe to open the file. We have to consider that we might open a bad path such as a script or launch an application. Edit: There is also an issue in line 400, we first need to check that |
Isn't this issue primarily about absolute paths? (Or are you using relative in the loose sense, of local?) |
Sorry, I was thinking about relative images before but it doesn't matter. If we find a valid path that isn't a URL or markdown file, try to open it with the default application. Relative paths are often used in blog pages and absolute if you manage your notes with Mark Text. It shouldn't be to hard to implement this but we need take care of bad paths. |
I feel cautious about giving the same behavior to absolute links versus relative. Absolute links seem to erode the principles of Markdown. |
This feature would be very helpful. I use Markdown notes to organize my work and the possibility to link to local files is quintessential for that. It is easy to do in Typora, impossible yet in Mark Text. I strongly support the development and the integration of this feature request. |
I would like to take a stab, but I am not sure what to do when |
Hi,
In my markdown files, I have link to pdf files written as
[name](/path/to/pdf.pdf)
. Those links are recognized by when I click them, nothing happens. In Typora, clicking on those links open them in my default pdf reader app.The text was updated successfully, but these errors were encountered: