diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index be7e9a6e2..d49c35667 100644 --- a/lisp/ob-tangle.el +++ b/lisp/ob-tangle.el @@ -352,7 +352,10 @@ that the appropriate major-mode is set. SPEC has the form: (format "%s\n" (org-unescape-code-in-string - (org-babel-trim body (if org-src-preserve-indentation "[\f\n\r\v]"))))) + (let ((rep (if org-src-preserve-indentation "[\f\n\r\v]" + "[\f\t\n\r\v]"))) + (replace-regexp-in-string + (concat rep "\\(.+\\)" rep) "\\1" body))))) (when link-p (funcall insert-comment