Function: majutsu-diff--apply-presentation-properties

majutsu-diff--apply-presentation-properties is a natively compiled function defined in majutsu-diff.el.

Signature

(majutsu-diff--apply-presentation-properties VALUE PROPERTIES)

Documentation

Apply PROPERTIES recursively to strings in JSON VALUE.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-diff.el
(defun majutsu-diff--apply-presentation-properties (value properties)
  "Apply PROPERTIES recursively to strings in JSON VALUE."
  (cond
   ((stringp value)
    (when (and properties (not (string-empty-p value)))
      (add-text-properties 0 (length value) properties value))
    value)
   ((vectorp value)
    (dotimes (index (length value))
      (aset value index
            (majutsu-diff--apply-presentation-properties
             (aref value index) properties)))
    value)
   (t value)))