org-babel-exp: no longer throws errors on empty bodies
This commit is contained in:
parent
ceeb4681ef
commit
4f113630f8
|
@ -137,7 +137,8 @@ options are taken from `org-babel-default-header-args'."
|
|||
('inline (format "=%s=" body))
|
||||
('block
|
||||
(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)
|
||||
(list 'org-caption
|
||||
(format "%s(%s)"
|
||||
|
|
Loading…
Reference in New Issue