소스 검색

ob-core: Fix the #+END_ directive from the :wrap param

* lisp/ob.el: Only use the :wrap argument up to the first space when creating
  the #+END_ directive.

Using an option like ":wrap SRC fundamental" was generating and end marker of
"#+END_SRC fundamental", which caused the new exporter to fail to handle to
block properly.

Patch from Michael Gauland.
Nicolas Goaziou 12 년 전
부모
커밋
90de5ee463
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      lisp/ob-core.el

+ 2 - 1
lisp/ob-core.el

@@ -2000,7 +2000,8 @@ code ---- the results are extracted in the syntax of the source
 		(cond
 		 ((assoc :wrap (nth 2 info))
 		  (let ((name (or (cdr (assoc :wrap (nth 2 info))) "RESULTS")))
-		    (funcall wrap (concat "#+BEGIN_" name) (concat "#+END_" name))))
+		    (funcall wrap (concat "#+BEGIN_" name)
+			     (concat "#+END_" (car (org-split-string name))))))
 		 ((member "html" result-params)
 		  (funcall wrap "#+BEGIN_HTML" "#+END_HTML"))
 		 ((member "latex" result-params)