Function: org-ascii-paragraph
org-ascii-paragraph is a byte-compiled function defined in
ox-ascii.el.gz.
Signature
(org-ascii-paragraph PARAGRAPH CONTENTS INFO)
Documentation
Transcode a PARAGRAPH element from Org to ASCII.
CONTENTS is the contents of the paragraph, as a string. INFO is the plist used as a communication channel.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-ascii.el.gz
;;;; Paragraph
(defun org-ascii-paragraph (paragraph contents info)
"Transcode a PARAGRAPH element from Org to ASCII.
CONTENTS is the contents of the paragraph, as a string. INFO is
the plist used as a communication channel."
;; Ensure that we do not create multiple paragraphs, when a single
;; paragraph is expected.
;; Multiple newlines may appear in CONTENTS, for example, when
;; certain objects are stripped from export, leaving single newlines
;; before and after.
(setq contents (org-remove-blank-lines contents))
(org-ascii--justify-element
(let ((indented-line-width (plist-get info :ascii-indented-line-width)))
(if (not (wholenump indented-line-width)) contents
(concat
;; Do not indent first paragraph in a section.
(unless (and (not (org-export-get-previous-element paragraph info))
(org-element-type-p
(org-element-parent paragraph) 'section))
(make-string indented-line-width ?\s))
(replace-regexp-in-string "\\`[ \t]+" "" contents))))
paragraph info))