Function: org-export--keep-spaces
org-export--keep-spaces is a byte-compiled function defined in
ox.el.gz.
Signature
(org-export--keep-spaces DATA INFO)
Documentation
Non-nil, when post-blank spaces after removing DATA should be preserved.
INFO is the info channel.
This function returns nil, when previous exported element already has
trailing spaces or when DATA does not have non-zero non-nil
:post-blank property.
When the return value is non-nil, it is a string containing the trailing spaces.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox.el.gz
(defun org-export--keep-spaces (data info)
"Non-nil, when post-blank spaces after removing DATA should be preserved.
INFO is the info channel.
This function returns nil, when previous exported element already has
trailing spaces or when DATA does not have non-zero non-nil
`:post-blank' property.
When the return value is non-nil, it is a string containing the trailing
spaces."
;; When DATA is an object, interpret this as if DATA should be
;; ignored (see `org-export--prune-tree'). Keep spaces in place of
;; removed element, if necessary. Example: "Foo.[10%] Bar" would
;; become "Foo.Bar" if we do not keep spaces. Another example: "A
;; space@@ascii:*@@ character." should become "A space character"
;; in non-ASCII export.
(let ((post-blank (org-element-post-blank data)))
(unless (or (not post-blank)
(zerop post-blank)
(eq 'element (org-element-class data)))
(let ((previous (org-export-get-previous-element data info)))
(unless (or (not previous)
(pcase (org-element-type previous)
(`plain-text
(string-match-p
(rx (any " \t\r\n") eos) previous))
(_ (org-element-post-blank previous))))
;; When previous element does not have
;; trailing spaces, keep the trailing
;; spaces from DATA.
(make-string post-blank ?\s))))))