Variable: markdown-regex-sub-superscript
markdown-regex-sub-superscript is a variable defined in
markdown-mode.el.
Value
"\\(?:^\\|[^\\~^]\\)\\(?1:\\(?2:[~^]\\)\\(?3:[+-−]?[[:alnum:]]+\\)\\(?4:\\2\\)\\)"
Documentation
The regular expression matching a sub- or superscript.
The leading un-numbered group matches the character before the opening tilde or carat, if any, ensuring that it is not a backslash escape, carat, or tilde. Group 1 matches the entire expression, including markup. Group 2 matches the opening markup--a tilde or carat. Group 3 matches the text inside the delimiters. Group 4 matches the closing markup--a tilde or carat.
Source Code
;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
(defconst markdown-regex-sub-superscript
"\\(?:^\\|[^\\~^]\\)\\(?1:\\(?2:[~^]\\)\\(?3:[+-\u2212]?[[:alnum:]]+\\)\\(?4:\\2\\)\\)"
"The regular expression matching a sub- or superscript.
The leading un-numbered group matches the character before the
opening tilde or carat, if any, ensuring that it is not a
backslash escape, carat, or tilde.
Group 1 matches the entire expression, including markup.
Group 2 matches the opening markup--a tilde or carat.
Group 3 matches the text inside the delimiters.
Group 4 matches the closing markup--a tilde or carat.")