[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/markdown-mode a2a7eed 3/3: Merge pull request #606 from te
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/markdown-mode a2a7eed 3/3: Merge pull request #606 from tejasvi/patch-1 |
Date: |
Mon, 5 Apr 2021 09:57:14 -0400 (EDT) |
branch: elpa/markdown-mode
commit a2a7eed5ce8043e24d19b6cd3a74eac4a4add92b
Merge: f18d26d 13d26a6
Author: Shohei YOSHIDA <syohex@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #606 from tejasvi/patch-1
Fix broken inline display of remote images
---
markdown-mode.el | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/markdown-mode.el b/markdown-mode.el
index 1737a7c..c93d051 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -8525,11 +8525,10 @@ or \\[markdown-toggle-inline-images]."
(let* ((start (match-beginning 0))
(imagep (match-beginning 1))
(end (match-end 0))
- (file (match-string-no-properties 6))
- (unhex_file (url-unhex-string file)))
+ (file (match-string-no-properties 6)))
(when (and imagep
(not (zerop (length file))))
- (unless (file-exists-p unhex_file)
+ (unless (file-exists-p file)
(let* ((download-file (funcall
markdown-translate-filename-function file))
(valid-url (ignore-errors
(member (downcase (url-type
(url-generic-parse-url download-file)))
@@ -8538,11 +8537,13 @@ or \\[markdown-toggle-inline-images]."
(setq file (markdown--get-remote-image download-file))
(when (not valid-url)
;; strip query parameter
- (setq file (replace-regexp-in-string "?.+\\'" "" file))))))
- (when (file-exists-p unhex_file)
- (let* ((abspath (if (file-name-absolute-p unhex_file)
- unhex_file
- (concat default-directory unhex_file)))
+ (setq file (replace-regexp-in-string "?.+\\'" "" file))
+ (unless (file-exists-p file)
+ (setq file (url-unhex-string file)))))))
+ (when (file-exists-p file)
+ (let* ((abspath (if (file-name-absolute-p file)
+ file
+ (concat default-directory file)))
(image
(cond ((and markdown-max-image-size
(image-type-available-p 'imagemagick))