Function: org-ascii-src-block

org-ascii-src-block is a byte-compiled function defined in ox-ascii.el.gz.

Signature

(org-ascii-src-block SRC-BLOCK CONTENTS INFO)

Documentation

Transcode a SRC-BLOCK element from Org to ASCII.

CONTENTS holds the contents of the item. INFO is a plist holding contextual information.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox-ascii.el.gz
;;;; Src Block

(defun org-ascii-src-block (src-block _contents info)
  "Transcode a SRC-BLOCK element from Org to ASCII.
CONTENTS holds the contents of the item.  INFO is a plist holding
contextual information."
  (let ((caption (org-ascii--build-caption src-block info))
	(caption-above-p (plist-get info :ascii-caption-above))
	(code (org-export-format-code-default src-block info)))
    (if (equal code "") ""
      (org-ascii--justify-element
       (concat
	(and caption caption-above-p (concat caption "\n"))
	(org-ascii--box-string code info)
	(and caption (not caption-above-p) (concat "\n" caption)))
       src-block info))))