branch: elpa/markdown-mode commit ec6ae5858be74530ba891277d53d05d0dce95edd Merge: d5106ff 0085875 Author: Shohei YOSHIDA <syo...@gmail.com> Commit: Shohei YOSHIDA <syo...@gmail.com>
Merge remote-tracking branch 'origin/master' into pr-581 --- CHANGES.md | 1 + markdown-mode.el | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 0953909..d3ed601 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -24,6 +24,7 @@ - Enable flyspell check at yaml metadata[GH-560][] - Clean up Makefile - Support to display local image with percent encoding file path + - Add ability to resize inline image display (`markdown-toggle-inline-images`) without Imagemagick installed in the computer (emulating Org Mode) - Support including braces around the language specification in GFM code blocks * Bug fixes: diff --git a/markdown-mode.el b/markdown-mode.el index 6c80f95..4d9ab78 100644 --- a/markdown-mode.el +++ b/markdown-mode.el @@ -8438,13 +8438,17 @@ or \\[markdown-toggle-inline-images]." unhex_file (concat default-directory unhex_file))) (image - (if (and markdown-max-image-size + (cond ((and markdown-max-image-size (image-type-available-p 'imagemagick)) - (create-image - abspath 'imagemagick nil - :max-width (car markdown-max-image-size) - :max-height (cdr markdown-max-image-size)) - (create-image abspath)))) + (create-image + abspath 'imagemagick nil + :max-width (car markdown-max-image-size) + :max-height (cdr markdown-max-image-size))) + (markdown-max-image-size + (create-image abspath nil nil + :max-width (car markdown-max-image-size) + :max-height (cdr markdown-max-image-size))) + (t (create-image abspath))))) (when image (let ((ov (make-overlay start end))) (overlay-put ov 'display image)