Function: org-html--make-attribute-string

org-html--make-attribute-string is a byte-compiled function defined in ox-html.el.gz.

Signature

(org-html--make-attribute-string ATTRIBUTES)

Documentation

Return a list of attributes, as a string.

ATTRIBUTES is a plist where values are either strings or nil. An attribute with a nil value will be omitted from the result.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox-html.el.gz
(defun org-html--make-attribute-string (attributes)
  "Return a list of attributes, as a string.
ATTRIBUTES is a plist where values are either strings or nil.  An
attribute with a nil value will be omitted from the result."
  (let (output)
    (dolist (item attributes (mapconcat 'identity (nreverse output) " "))
      (cond ((null item) (pop output))
            ((symbolp item) (push (substring (symbol-name item) 1) output))
            (t (let ((key (car output))
                     (value (replace-regexp-in-string
                             "\"" """ (org-html-encode-plain-text item))))
                 (setcar output (format "%s=\"%s\"" key value))))))))