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

Package Preview Markdown - Broken Links #258

Open
5 tasks done
ElectronicsArchiver opened this issue Dec 24, 2022 · 6 comments
Open
5 tasks done

Package Preview Markdown - Broken Links #258

ElectronicsArchiver opened this issue Dec 24, 2022 · 6 comments
Labels
bug Something isn't working package-issue This issue is present in a community package, but Puslar is the cause regression Something now broken that worked on Upstream Atom

Comments

@ElectronicsArchiver
Copy link
Contributor

Thanks in advance for your bug report!

  • Have you reproduced issue in safe mode?
  • Have you used the debugging guide to try to resolve the issue?
  • Have you checked our FAQs to make sure your question isn't answered there?
  • Does your issue already exist?
  • Have you checked you are on the latest release of Pulsar?

What happened?

I took over maintainership of some Atom packages
and reworked the documentation, wanted to test
how it looked when loaded in Pulsar, copied the
repository into the packages folder and checked
the preview.

Any content with relative links is broken:

  • Images don't load
  • Links aren't clickable

Which OS does this happen on?

🐧 Debian based (Linux Mint, Ubuntu, etc.)

OS details

Kubuntu 22.04

Which CPU architecture are you running this on?

64-bit(x86_64)

What steps are needed to reproduce this?

  1. Open Pulsar
  2. Open any package preview that uses relative links

Additional Information:

No response

@ElectronicsArchiver ElectronicsArchiver added the bug Something isn't working label Dec 24, 2022
@confused-Techie
Copy link
Member

I want to note here, that links have never been clickable in the markdown preview, so this isn't a regression on our part.

This aspect at least is a feature request, but I can't speak to images.

@ElectronicsArchiver
Copy link
Contributor Author

@confused-Techie I at least know 'why' now,
like I stated in other issues, Pulsars devtools
don't open, however in Atom I can see that
the url that - in the markdown - is specified
relative, is made into an absolute link in
the preview with the domain being GitHubs.

This of course doesn't work as it's the user
facing page, not the link to the file itself.

Relative:

Resources/Screenshots/Showcase.png

Preview Link:

https://github.com/richrace/highlight-line/blob/master/Resources/Screenshots/Showcase.png

@ElectronicsArchiver
Copy link
Contributor Author

As a note:

The expected behaviour would be that

  • relative links are relative to the packages folder
  • throw 403 on trying to go above the packages folder

@confused-Techie confused-Techie added regression Something now broken that worked on Upstream Atom package-issue This issue is present in a community package, but Puslar is the cause labels Dec 31, 2022
@Spiker985
Copy link
Member

Is this still an issue?

@confused-Techie
Copy link
Member

@Spiker985 Partially. So the more I look into this I don't see any reason why images wouldn't be working here, since they have been functional for me locally.

But otherwise the rest of this issue is asking for a feature request, one that nobody has spent any time on just yet (and one that now thinking about it I have my reservations).

Essentially, the feature request would be for links to resolve within Markdown preview. They do note that this would be relative links, but I do wonder about how possible it'd be to add the ability to follow links, but then disallow the editor from opening links to websites, images, or folders even when local, since obviously it'd only be able to open up other markdown files locally.

@Spiker985
Copy link
Member

It also sounds like in Atom it might've had some special handling, perhaps if the file was already in a GitHub repo, to preview local links as their remote counterpart?

Unless that's another package's doing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working package-issue This issue is present in a community package, but Puslar is the cause regression Something now broken that worked on Upstream Atom
Projects
None yet
Development

No branches or pull requests

3 participants