Variable: markdown-regex-link-reference

markdown-regex-link-reference is a variable defined in markdown-mode.el.

Value

"\\(?1:!\\)?\\(?2:\\[\\)\\(?3:[^]^][^]]*\\|\\)\\(?4:\\]\\)\\(?5:\\[\\)\\(?6:[^]]*?\\)\\(?7:\\]\\)"

Documentation

Regular expression for a reference link [text][id].

Group 1 matches the leading exclamation point (optional). Group 2 matches the opening square bracket for the link text. Group 3 matches the text inside the square brackets. Group 4 matches the closing square bracket for the link text. Group 5 matches the opening square bracket for the reference label. Group 6 matches the reference label. Group 7 matches the closing square bracket for the reference label.

Source Code

;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
(defconst markdown-regex-link-reference
  "\\(?1:!\\)?\\(?2:\\[\\)\\(?3:[^]^][^]]*\\|\\)\\(?4:\\]\\)\\(?5:\\[\\)\\(?6:[^]]*?\\)\\(?7:\\]\\)"
  "Regular expression for a reference link [text][id].
Group 1 matches the leading exclamation point (optional).
Group 2 matches the opening square bracket for the link text.
Group 3 matches the text inside the square brackets.
Group 4 matches the closing square bracket for the link text.
Group 5 matches the opening square bracket for the reference label.
Group 6 matches the reference label.
Group 7 matches the closing square bracket for the reference label.")