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

load markdown images from origin when not a URL #5579

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

hkparker
Copy link
Contributor

@hkparker hkparker commented Mar 8, 2025

Description:

Markdown supports loading local images off disk. Currently, in fyne, when in the web, this doesn't work, because the browser can't access the local file system like that. However, what I've seen from other markdown implementations is that in the web, a "local" file means from the same origin as the markdown file. For example ![](foo.png) in a markdown loaded from fyne.io should be interpreted as ![](fyne.io/foo.png).

This change adds that behavior to Fyne's markdown parser. This has been tested locally for a website I'm working on with Fyne.

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

@hkparker hkparker marked this pull request as draft March 8, 2025 13:38
@hkparker hkparker changed the title [DRAFT] load markdown images from origin when not a URL load markdown images from origin when not a URL Mar 8, 2025
@coveralls
Copy link

coveralls commented Mar 9, 2025

Coverage Status

coverage: 62.322% (+0.005%) from 62.317%
when pulling 9b83bbc on hkparker:hkparker-get-markdown-images-from-origin
into 1a782f3 on fyne-io:develop.

@hkparker hkparker marked this pull request as ready for review March 9, 2025 12:33
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

Successfully merging this pull request may close these issues.

2 participants