瀏覽代碼

ox-latex: Tiny refactoring

* lisp/ox-latex.el (org-latex--label): Tiny refactoring.
Nicolas Goaziou 10 年之前
父節點
當前提交
3d4a153105
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      lisp/ox-latex.el

+ 3 - 2
lisp/ox-latex.el

@@ -1069,8 +1069,9 @@ Eventually, if FULL is non-nil, wrap label within \"\\label{}\"."
 		   user-label
 		 (org-export-get-reference datum info)))))
     (cond ((not full) label)
-	  (label (concat (format "\\label{%s}" label)
-			 (and (not (eq type 'target)) "\n")))
+	  (label (format "\\label{%s}%s"
+			 label
+			 (if (eq type 'target) "" "\n")))
 	  (t ""))))
 
 (defun org-latex--caption/label-string (element info)