diff --git a/lisp/org.el b/lisp/org.el index 0381a26..51230b3 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -15502,12 +15502,14 @@ with a description part will be inlined." (interactive "P") (org-remove-inline-images) (goto-char (point-min)) - (let ((re (concat "\\[\\[\\(file:\\|\\./\\)\\(~?" "[-+./_0-9a-zA-Z]+" + (let ((re (concat "\\[\\[\\(\\(file:\\)\\|\\([./~]\\)\\)\\([-+~./_0-9a-zA-Z]+" (substring (org-image-file-name-regexp) 0 -2) "\\)\\]" (if include-linked "" "\\]"))) file ov) (while (re-search-forward re nil t) - (setq file (expand-file-name (match-string 2))) + (setq file (expand-file-name + (concat (or (match-string 3) "") + (match-string 4)))) (when (file-exists-p file) (setq ov (make-overlay (match-beginning 0) (match-end 0))) (overlay-put ov 'display (create-image file))