Просмотр исходного кода

org-export: Fix small bug

* contrib/lisp/org-export.el (org-export-get-coderef-format): Handle
  nil descriptions.
Nicolas Goaziou 14 лет назад
Родитель
Сommit
0264495f52
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      contrib/lisp/org-export.el

+ 2 - 2
contrib/lisp/org-export.el

@@ -2736,9 +2736,9 @@ INFO is the plist used as a communication channel."
   "Return format string for code reference link.
   "Return format string for code reference link.
 PATH is the link path.  DESC is its description."
 PATH is the link path.  DESC is its description."
   (save-match-data
   (save-match-data
-    (cond ((string-match (regexp-quote (concat "(" path ")")) desc)
+    (cond ((not desc) "%s")
+	  ((string-match (regexp-quote (concat "(" path ")")) desc)
 	   (replace-match "%s" t t desc))
 	   (replace-match "%s" t t desc))
-	  ((string= desc "") "%s")
 	  (t desc))))
 	  (t desc))))
 
 
 (defun org-export-inline-image-p (link &optional rules)
 (defun org-export-inline-image-p (link &optional rules)