瀏覽代碼

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
Dan Davison 14 年之前
父節點
當前提交
88b793946b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lisp/ob-exp.el

+ 1 - 1
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.