Function: htmlize-string-to-html
htmlize-string-to-html is a byte-compiled function defined in
htmlize.el.
Signature
(htmlize-string-to-html STRING)
Source Code
;; Defined in ~/.emacs.d/elpa/htmlize-20250724.1703/htmlize.el
(defun htmlize-string-to-html (string)
;; Convert the string to HTML, including images attached as
;; `display' property and links as `htmlize-link' property. In a
;; string without images or links, this is equivalent to
;; `htmlize-protect-string'.
(let ((pos 0) (end (length string)) outlist)
(while (< pos end)
(let* ((display (get-char-property pos 'display string))
(next-display-change (next-single-property-change
pos 'display string end))
(chunk (substring string pos next-display-change)))
(push
(if display
(htmlize-display-prop-to-html display chunk)
(htmlize-escape-or-link chunk))
outlist)
(setq pos next-display-change)))
(htmlize-concat (nreverse outlist))))