Function: htmlize-extract-text
htmlize-extract-text is a byte-compiled function defined in
htmlize.el.
Signature
(htmlize-extract-text BEG END TRAILING-ELLIPSIS)
Source Code
;; Defined in ~/.emacs.d/elpa/htmlize-20250724.1703/htmlize.el
(defun htmlize-extract-text (beg end trailing-ellipsis)
;; Extract buffer text, sans the invisible parts. Then
;; untabify it and escape the HTML metacharacters.
(let ((text (htmlize-buffer-substring-no-invisible beg end)))
(when trailing-ellipsis
(setq text (htmlize-trim-ellipsis text)))
;; If TEXT ends up empty, don't change trailing-ellipsis.
(when (> (length text) 0)
(setq trailing-ellipsis
(get-text-property (1- (length text))
'htmlize-ellipsis text)))
(when htmlize-untabify
(setq text (htmlize-untabify-string text (current-column))))
(setq text (htmlize-string-to-html text))
(cl-values text trailing-ellipsis)))