0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-17 09:36:26 +00:00

org-babel-exp: no longer throws errors on empty bodies

This commit is contained in:
Eric Schulte 2010-05-25 20:20:13 -06:00
parent ceeb4681ef
commit 4f113630f8

View file

@ -137,7 +137,8 @@ options are taken from `org-babel-default-header-args'."
('inline (format "=%s=" body)) ('inline (format "=%s=" body))
('block ('block
(let ((str (format "#+BEGIN_SRC %s %s\n%s%s#+END_SRC\n" lang switches body (let ((str (format "#+BEGIN_SRC %s %s\n%s%s#+END_SRC\n" lang switches body
(if (string-match "\n$" body) "" "\n")))) (if (and body (string-match "\n$" body))
"" "\n"))))
(when name (add-text-properties 0 (length str) (when name (add-text-properties 0 (length str)
(list 'org-caption (list 'org-caption
(format "%s(%s)" (format "%s(%s)"