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

markdown-translate-filename-function is not used for remote inline images #422

Closed
jmalmari opened this issue Nov 26, 2019 · 2 comments
Closed

Comments

@jmalmari
Copy link

Expected Behavior

I believe markdown-display-inline-images should be able to work with remote images, even when the remote image file names are relative. Obvious choice of implementation would be to use the existing markdown-translate-filename-function.

My personal motivation for this is to get it working with GitLab which uses such relative paths: https://about.gitlab.com/handbook/product/technical-writing/markdown-guide/#images

Actual Behavior

Images are not fetched nor displayed inline.

Steps to Reproduce

With the following markdown buffer

# Inline image example
![emoji](/images/icons/emoji/unicode/1f334.png)

evaluate following expressions:

(setq markdown-display-remote-images t)
(defun my-server-file (file)
  (concat "https://github.githubassets.com" file))
(setq markdown-translate-filename-function #'my-server-file)

Now, by executing markdown-display-inline-images I would expect to see the image fetched and displayed.

Inside markdown-display-inline-images, if I replace the file with its translated version the above example works.

Software Versions

  • markdown 2.4-dev
  • GNU Emacs 27.0.50
@syohex
Copy link
Collaborator

syohex commented May 13, 2020

I have merged #485. please check latest version.

@syohex syohex closed this as completed May 13, 2020
@jmalmari
Copy link
Author

I have merged #485. please check latest version.

Works for me, thank you!

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

2 participants