summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2014-04-18 14:49:21 +0200
committerBastien Guerry <bzg@altern.org>2014-04-18 14:49:21 +0200
commita13e133f5a5330f82683fe490d6d697d9aa55c51 (patch)
tree14fd3e7017a9c130ea5b557b1e1ee202b0666944
parentc9a8659cb6fcb2e8d8569298d8688c283e8e8f16 (diff)
downloadorg-mode-a13e133f5a5330f82683fe490d6d697d9aa55c51.tar.gz
ob-tangle.el (org-babel-spec-to-string): Don't use `org-babel-trim
* ob-tangle.el (org-babel-spec-to-string): Don't use `org-babel-trim'.
-rw-r--r--lisp/ob-tangle.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index be7e9a6..d49c356 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