Function: markdown--filter-visible

markdown--filter-visible is a byte-compiled function defined in markdown-mode.el.

Signature

(markdown--filter-visible BEG END &optional DELETE)

Source Code

;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
(defun markdown--filter-visible (beg end &optional delete)
  (let ((result "")
        (invisible-faces '(markdown-header-delimiter-face markdown-header-rule-face)))
    (while (< beg end)
      (when (markdown--face-p beg invisible-faces)
        (cl-incf beg)
        (while (and (markdown--face-p beg invisible-faces) (< beg end))
          (cl-incf beg)))
      (let ((next (next-single-char-property-change beg 'invisible)))
        (unless (get-char-property beg 'invisible)
          (setq result (concat result (buffer-substring beg (min end next)))))
        (setq beg next)))
    (prog1 result
      (when delete
        (let ((inhibit-read-only t))
          (delete-region beg end))))))