Function: markdown-fill-paragraph
markdown-fill-paragraph is an interactive and byte-compiled function
defined in markdown-mode.el.
Signature
(markdown-fill-paragraph &optional JUSTIFY)
Documentation
Fill paragraph at or after point.
This function is like M-q (fill-paragraph), but it skips Markdown
code blocks. If the point is in a code block, or just before one,
do not fill. Otherwise, call fill-paragraph as usual. If
JUSTIFY is non-nil, justify text as well. Since this function
handles filling itself, it always returns t so that
fill-paragraph doesn't run.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
(defun markdown-fill-paragraph (&optional justify)
"Fill paragraph at or after point.
This function is like \\[fill-paragraph], but it skips Markdown
code blocks. If the point is in a code block, or just before one,
do not fill. Otherwise, call `fill-paragraph' as usual. If
JUSTIFY is non-nil, justify text as well. Since this function
handles filling itself, it always returns t so that
`fill-paragraph' doesn't run."
(interactive "P")
(unless (or (markdown-code-block-at-point-p)
(save-excursion
(back-to-indentation)
(skip-syntax-forward "-")
(markdown-code-block-at-point-p)))
(let ((fill-prefix (save-excursion
(goto-char (line-beginning-position))
(when (looking-at "\\([ \t]*>[ \t]*\\(?:>[ \t]*\\)+\\)")
(match-string-no-properties 1)))))
(fill-paragraph justify)))
t)