Function: markdown--dnd-insert-path

markdown--dnd-insert-path is a byte-compiled function defined in markdown-mode.el.

Signature

(markdown--dnd-insert-path FILENAME)

Source Code

;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
(defun markdown--dnd-insert-path (filename)
  (let ((mimetype (mailcap-file-name-to-mime-type filename))
        (link-text "link text"))
    (when (string-match-p "\\s-" filename)
      (setq filename (concat "<" filename ">")))
    (if (string-prefix-p "image/" mimetype)
        (markdown-insert-inline-image link-text filename)
      (markdown-insert-inline-link link-text filename))))