diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2011-09-13 08:57:29 -0600 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2011-09-13 08:57:29 -0600 |
commit | 597e1eb4fe7b2674c2d5233f215217f7b35e4035 (patch) | |
tree | ed077c282ccca41abd1d9320c947f9f44f75f4ca | |
parent | dbf0e6d5bcbe94c8ee57d68889d3c25bf9cdef55 (diff) | |
download | org-mode-597e1eb4fe7b2674c2d5233f215217f7b35e4035.tar.gz |
Don't error on empty code block body.
* lisp/ob.el (org-babel-parse-src-block-match): Don't error on empty
code block body.
-rw-r--r-- | lisp/ob.el | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1021,7 +1021,8 @@ may be specified in the current buffer." (body (org-babel-clean-text-properties (let* ((body (match-string 5)) (sub-length (- (length body) 1))) - (if (string= "\n" (substring body sub-length)) + (if (and (> sub-length 0) + (string= "\n" (substring body sub-length))) (substring body 0 sub-length) body)))) (preserve-indentation (or org-src-preserve-indentation |