A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/jrblevin/markdown-mode/issues/422 below:

`markdown-translate-filename-function` is not used for remote inline images · Issue #422 · jrblevin/markdown-mode · GitHub

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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4