Variable: markdown-regex-header
markdown-regex-header is a variable defined in markdown-mode.el.
Value
"^\\(?:\\(?1:[^
\n -].*\\)\n\\(?:\\(?2:=+\\)\\|\\(?3:-+\\)\\)\\|\\(?4:#+[ ]+\\)\\(?5:.*?\\)\\(?6:[ ]+#+\\)?\\)$"
Documentation
Regexp identifying Markdown headings.
Group 1 matches the text of a setext heading. Group 2 matches the underline of a level-1 setext heading. Group 3 matches the underline of a level-2 setext heading. Group 4 matches the opening hash marks of an atx heading and whitespace. Group 5 matches the text, without surrounding whitespace, of an atx heading. Group 6 matches the closing whitespace and hash marks of an atx heading.
Source Code
;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
(defconst markdown-regex-header
"^\\(?:\\(?1:[^\r\n\t -].*\\)\n\\(?:\\(?2:=+\\)\\|\\(?3:-+\\)\\)\\|\\(?4:#+[ \t]+\\)\\(?5:.*?\\)\\(?6:[ \t]+#+\\)?\\)$"
"Regexp identifying Markdown headings.
Group 1 matches the text of a setext heading.
Group 2 matches the underline of a level-1 setext heading.
Group 3 matches the underline of a level-2 setext heading.
Group 4 matches the opening hash marks of an atx heading and whitespace.
Group 5 matches the text, without surrounding whitespace, of an atx heading.
Group 6 matches the closing whitespace and hash marks of an atx heading.")