浏览代码

ox-beamer: Fix export snippets in sublists

* lisp/ox-beamer.el (org-beamer-item): Insert the export snippet right
  after the first \item, not all of them.

Thanks to Andreas Leha for reporting it.
Nicolas Goaziou 11 年之前
父节点
当前提交
0d7b052cfa
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lisp/ox-beamer.el

+ 2 - 2
lisp/ox-beamer.el

@@ -644,11 +644,11 @@ contextual information."
 		  (and (eq (org-element-type first-element) 'paragraph)
 		       (org-beamer--element-has-overlay-p first-element))))
 	(output (org-export-with-backend 'latex item contents info)))
-    (if (not action) output
+    (if (or (not action) (not (string-match "\\\\item" output))) output
       ;; If the item starts with a paragraph and that paragraph starts
       ;; with an export snippet specifying an overlay, insert it after
       ;; \item command.
-      (replace-regexp-in-string "\\\\item" (concat "\\\\item" action) output))))
+      (replace-match (concat "\\\\item" action) nil nil output))))
 
 
 ;;;; Keyword