Function: markdown-reference-definition
markdown-reference-definition is a byte-compiled function defined in
markdown-mode.el.
Signature
(markdown-reference-definition REFERENCE)
Documentation
Find out whether Markdown REFERENCE is defined.
REFERENCE should not include the square brackets.
When REFERENCE is defined, return a list of the form (text start end)
containing the definition text itself followed by the start and end
locations of the text. Otherwise, return nil.
Leave match data for markdown-regex-reference-definition
intact additional processing.
Source Code
;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
(defun markdown-reference-definition (reference)
"Find out whether Markdown REFERENCE is defined.
REFERENCE should not include the square brackets.
When REFERENCE is defined, return a list of the form (text start end)
containing the definition text itself followed by the start and end
locations of the text. Otherwise, return nil.
Leave match data for `markdown-regex-reference-definition'
intact additional processing."
(let ((reference (downcase reference)))
(save-excursion
(goto-char (point-min))
(catch 'found
(while (re-search-forward markdown-regex-reference-definition nil t)
(when (string= reference (downcase (match-string-no-properties 2)))
(throw 'found
(list (match-string-no-properties 5)
(match-beginning 5) (match-end 5)))))))))