diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-10-25 16:23:51 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-10-25 16:24:48 +0200 |
commit | 78c5838e4e64d4582c345eca0e5ae76aee1842d2 (patch) | |
tree | bcd78900ee365daa8c2b6d7b400fe841777b6853 | |
parent | c712d653976679b2a9a1e7b9f4e6eb4e82c3f6fa (diff) | |
download | org-mode-78c5838e4e64d4582c345eca0e5ae76aee1842d2.tar.gz |
ob-exp: Escape code when re-creating a src blocks
* lisp/ob-exp.el (org-babel-exp-code): Escape code when re-creating
a src blocks.
-rw-r--r-- | lisp/ob-exp.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el index a2b0f48..0a02ea1 100644 --- a/lisp/ob-exp.el +++ b/lisp/ob-exp.el @@ -48,7 +48,7 @@ (declare-function org-element-context "org-element" ()) (declare-function org-element-property "org-element" (property element)) (declare-function org-element-type "org-element" (element)) - +(declare-function org-escape-code-in-string "org-src" (s)) (defcustom org-export-babel-evaluate t "Switch controlling code evaluation during export. @@ -359,7 +359,7 @@ replaced with its value." (org-fill-template org-babel-exp-code-template `(("lang" . ,(nth 0 info)) - ("body" . ,(nth 1 info)) + ("body" . ,(org-escape-code-in-string (nth 1 info))) ,@(mapcar (lambda (pair) (cons (substring (symbol-name (car pair)) 1) (format "%S" (cdr pair)))) |