Function: cider--fragments-to-s

cider--fragments-to-s is a byte-compiled function defined in cider-docstring.el.

Signature

(cider--fragments-to-s FRAGMENTS)

Documentation

Convert FRAGMENTS into a concatenated string representation.

If a given fragment is of html type, it's converted to a propertized string; otherwise, it's included as-is.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-docstring.el
(defun cider--fragments-to-s (fragments)
  "Convert FRAGMENTS into a concatenated string representation.
If a given fragment is of html type, it's converted to a propertized string;
otherwise, it's included as-is."
  (when (and fragments
             (> (length fragments)
                0))
    (string-trim (seq-reduce (lambda (new-s fragment)
                               (let* ((html? (equal "html" (nrepl-dict-get fragment "type")))
                                      (v (nrepl-dict-get fragment "content")))
                                 (concat new-s (if html?
                                                   (let ((shr-use-fonts nil)
                                                         (shr-external-rendering-functions '((pre . cider--render-pre))))
                                                     (cider--html-to-propertized-string v))
                                                 v))))
                             fragments
                             ""))))