Variable: markdown-fenced-block-pairs

markdown-fenced-block-pairs is a variable defined in markdown-mode.el.

Value

((("^[[:blank:]]*\\([~]\\{3,\\}\\)\\([[:blank:]]*{?\\)[[:blank:]]*\\([^[:space:]]+?\\)?\\(?:[[:blank:]]+\\(.+?\\)\\)?\\([[:blank:]]*}?[[:blank:]]*\\)$"
   markdown-tilde-fence-begin)
  (markdown-make-tilde-fence-regex markdown-tilde-fence-end)
  markdown-fenced-code)
 ((markdown-get-yaml-metadata-start-border
   markdown-yaml-metadata-begin)
  (markdown-get-yaml-metadata-end-border markdown-yaml-metadata-end)
  markdown-yaml-metadata-section)
 (("^[[:blank:]]*\\(?1:`\\{3,\\}\\)\\(?2:[[:blank:]]*{?[[:blank:]]*\\)\\(?3:[^`[:space:]]+?\\)?\\(?:[[:blank:]]+\\(?4:.+?\\)\\)?\\(?5:[[:blank:]]*}?[[:blank:]]*\\)$"
   markdown-gfm-block-begin)
  (markdown-make-gfm-fence-regex markdown-gfm-block-end)
  markdown-gfm-code))

Documentation

Mapping of regular expressions to "fenced-block" constructs.

These constructs are distinguished by having a distinctive start and end pattern, both of which take up an entire line of text, but no special pattern to identify text within the fenced blocks (unlike blockquotes and indented-code sections).

Each element within this list takes the form:

  ((START-REGEX-OR-FUN START-PROPERTY)
   (END-REGEX-OR-FUN END-PROPERTY)
   MIDDLE-PROPERTY)

Each *-REGEX-OR-FUN element can be a regular expression as a string, or a function which evaluates to same. Functions for START-REGEX-OR-FUN accept no arguments, but functions for END-REGEX-OR-FUN accept a single numerical argument which is the length of the first group of the START-REGEX-OR-FUN match, which can be ignored if unnecessary. markdown-maybe-funcall-regexp is used to evaluate these into "real" regexps.

The *-PROPERTY elements are the text properties applied to each part of the block construct when it is matched using markdown-syntax-propertize-fenced-block-constructs. START-PROPERTY is applied to the text matching START-REGEX-OR-FUN, END-PROPERTY to END-REGEX-OR-FUN, and MIDDLE-PROPERTY to the text in between the two. The value of *-PROPERTY is the match-data when the regexp was matched to the text. In the case of MIDDLE-PROPERTY, the value is a false match data of the form '(begin end), with begin and end set to the edges of the "middle" text. This makes fontification easier.

Source Code

;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
(defconst markdown-fenced-block-pairs
  `(((,markdown-regex-tilde-fence-begin markdown-tilde-fence-begin)
     (markdown-make-tilde-fence-regex markdown-tilde-fence-end)
     markdown-fenced-code)
    ((markdown-get-yaml-metadata-start-border markdown-yaml-metadata-begin)
     (markdown-get-yaml-metadata-end-border markdown-yaml-metadata-end)
     markdown-yaml-metadata-section)
    ((,markdown-regex-gfm-code-block-open markdown-gfm-block-begin)
     (markdown-make-gfm-fence-regex markdown-gfm-block-end)
     markdown-gfm-code))
  "Mapping of regular expressions to \"fenced-block\" constructs.
These constructs are distinguished by having a distinctive start
and end pattern, both of which take up an entire line of text,
but no special pattern to identify text within the fenced
blocks (unlike blockquotes and indented-code sections).

Each element within this list takes the form:

  ((START-REGEX-OR-FUN START-PROPERTY)
   (END-REGEX-OR-FUN END-PROPERTY)
   MIDDLE-PROPERTY)

Each *-REGEX-OR-FUN element can be a regular expression as a string, or a
function which evaluates to same. Functions for START-REGEX-OR-FUN accept no
arguments, but functions for END-REGEX-OR-FUN accept a single numerical argument
which is the length of the first group of the START-REGEX-OR-FUN match, which
can be ignored if unnecessary. `markdown-maybe-funcall-regexp' is used to
evaluate these into \"real\" regexps.

The *-PROPERTY elements are the text properties applied to each part of the
block construct when it is matched using
`markdown-syntax-propertize-fenced-block-constructs'. START-PROPERTY is applied
to the text matching START-REGEX-OR-FUN, END-PROPERTY to END-REGEX-OR-FUN, and
MIDDLE-PROPERTY to the text in between the two. The value of *-PROPERTY is the
`match-data' when the regexp was matched to the text. In the case of
MIDDLE-PROPERTY, the value is a false match data of the form \\='(begin end), with
begin and end set to the edges of the \"middle\" text. This makes fontification
easier.")