summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2011-02-07 22:23:56 +0000
committerDan Davison <dandavison7@gmail.com>2011-02-07 22:27:14 +0000
commit88b793946bef4df484071e3a34b287e70fb0c9b5 (patch)
tree89ebb77ad1ac9d7cc4be31002c88865d82f9db0a
parent9e8f1ddcd8b37742e5363d41c02bf38c26cf2e6b (diff)
downloadorg-mode-88b793946bef4df484071e3a34b287e70fb0c9b5.tar.gz
ob: Fix bug in export of lob one-liners
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Only replace the match if a non-nil result is returned
-rw-r--r--lisp/ob-exp.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
index 96155a1..c99defc 100644
--- a/lisp/ob-exp.el
+++ b/lisp/ob-exp.el
@@ -222,7 +222,7 @@ options are taken from `org-babel-default-header-args'."
(car (last lob-info)))
'lob))))
(setq end (+ end (- (length replacement) (length (match-string 0)))))
- (replace-match replacement t t)))))
+ (if replacement (replace-match replacement t t))))))
(defun org-babel-exp-do-export (info type)
"Return a string with the exported content of a code block.