Hi Aaron, I really appreciate your feedback. That helped fine-tune my implementation of details/summary. I now moved that code to the ox-blackfriday library when I have this in org-blackfriday-special-block: It's basically QOL code: 1. Wraps the "details" portion in "

..

". 2. Accepts only ":open t" as a "true condition" to keep the details widget open by default. Detecting that inserts just "open" in the "details" element. So ":open nil" or ":open foo" would not result in inserting any open attr at all. The modified contents and attr-str in the below snippet are later used as: (format "<%s%s>\n%s\n" block-type attr-str contents block-type) ((string= block-type "details") (setq contents (let* ((str1 (concat contents "\n

")) (str2 (replace-regexp-in-string "\\(?:.\\|\n\\)*" "\\&\n

" str1)) (has-summary (not (string= str1 str2)))) (unless has-summary (setq str2 (concat "

" str1))) str2)) ;; Insert the "open" attribute only if user has ":open t" in ;; "#+attr_html". (when (org-string-nw-p attr-str) (when (string-match "\\(?1:open\\(?2:=\"\\(?3:t\\)\"\\)\\)" attr-str) (if (match-string 3 attr-str) ;if attr-str contains `open="t"' (setq attr-str (replace-match "" nil nil attr-str 2)) (setq attr-str (replace-match "" nil nil attr-str 1)))))) -- Kaushal Modi