From 5aa4d0f8f36aa6d2b5c54c5f3efede6e01cad421 Mon Sep 17 00:00:00 2001 From: Takushi Usami Date: Sun, 16 Mar 2025 00:16:05 +0900 Subject: [PATCH] enable to preview with relative images. --- markdown-mode.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/markdown-mode.el b/markdown-mode.el index 311050f4..2157ae34 100644 --- a/markdown-mode.el +++ b/markdown-mode.el @@ -7663,6 +7663,16 @@ or remove markup." ;;; Commands ================================================================== +(defun markdown--replace-rel2abs (output-buffer-name) + "Convert relative image URLs to absolute paths in OUTPUT-BUFFER-NAME." + (let ((buf (get-buffer-create output-buffer-name)) + (base-path default-directory)) + (with-current-buffer buf + (goto-char (point-min)) + (while (re-search-forward "