From 0264495f52bfb6e105faf79377b6c026a0f8fd7f Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sat, 21 Apr 2012 15:18:28 +0200 Subject: [PATCH] org-export: Fix small bug * contrib/lisp/org-export.el (org-export-get-coderef-format): Handle nil descriptions. --- contrib/lisp/org-export.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/lisp/org-export.el b/contrib/lisp/org-export.el index 5c8d672de..015934d9b 100644 --- a/contrib/lisp/org-export.el +++ b/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. PATH is the link path. DESC is its description." (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)) - ((string= desc "") "%s") (t desc)))) (defun org-export-inline-image-p (link &optional rules)