Function: org-element-example-block-interpreter
org-element-example-block-interpreter is a byte-compiled function
defined in org-element.el.gz.
Signature
(org-element-example-block-interpreter EXAMPLE-BLOCK _)
Documentation
Interpret EXAMPLE-BLOCK element as Org syntax.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-element.el.gz
(defun org-element-example-block-interpreter (example-block _)
"Interpret EXAMPLE-BLOCK element as Org syntax."
(let ((switches (org-element-property :switches example-block))
(value
(let ((val (org-element-property :value example-block)))
(cond
((or org-src-preserve-indentation
(org-element-property :preserve-indent example-block))
val)
((= 0 org-edit-src-content-indentation)
(org-remove-indentation val))
(t
(let ((ind (make-string org-edit-src-content-indentation ?\s)))
(replace-regexp-in-string "^[ \t]*\\S-"
(concat ind "\\&")
(org-remove-indentation val))))))))
(concat "#+begin_example" (and switches (concat " " switches)) "\n"
(org-element-normalize-string (org-escape-code-in-string value))
"#+end_example")))