Function: htmlize-font-text-markup

htmlize-font-text-markup is a byte-compiled function defined in htmlize.el.

Signature

(htmlize-font-text-markup FSTRUCT-LIST BUFFER)

Source Code

;; Defined in ~/.emacs.d/elpa/htmlize-20250724.1703/htmlize.el
(defun htmlize-font-text-markup (fstruct-list buffer)
  ;; In `font' mode, we use the traditional HTML means of altering
  ;; presentation: <font> tag for colors, <b> for bold, <u> for
  ;; underline, and <strike> for strike-through.
  (let* ((merged (htmlize-merge-faces fstruct-list))
         (markup (htmlize-memoize
                  merged
                  (cons (concat
                         (and (htmlize-fstruct-foreground merged)
                              (format "<font color=\"%s\">"
                                      (htmlize-fstruct-foreground merged)))
                         (and (htmlize-fstruct-boldp merged)      "<b>")
                         (and (htmlize-fstruct-italicp merged)    "<i>")
                         (and (htmlize-fstruct-underlinep merged) "<u>")
                         (and (htmlize-fstruct-strikep merged)    "<strike>"))
                        (concat
                         (and (htmlize-fstruct-strikep merged)    "</strike>")
                         (and (htmlize-fstruct-underlinep merged) "</u>")
                         (and (htmlize-fstruct-italicp merged)    "</i>")
                         (and (htmlize-fstruct-boldp merged)      "</b>")
                         (and (htmlize-fstruct-foreground merged) "</font>"))))))
    (princ (car markup) buffer)
    (lambda ()
      (princ (cdr markup) buffer))))