From 4b7006f444950811a1266feaf5b36d24d7a04cbf Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 5 Jun 2013 14:24:18 +0200 Subject: [PATCH] ox: Fix "Wrong argument type" error when attributes start with :key "" * lisp/ox.el (org-export-read-attribute): Fix "Wrong argument type" error when attributes start with :key "". --- lisp/ox.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/ox.el b/lisp/ox.el index 7544b7ad4..66d68acac 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -3460,10 +3460,11 @@ double quotes will be read as-is, which means that \"\" value will become the empty string." (let* ((prepare-value (lambda (str) - (cond ((member str '(nil "" "nil")) nil) - ((string-match "^\"\\(\"+\\)?\"$" str) - (or (match-string 1 str) "")) - (t str)))) + (save-match-data + (cond ((member str '(nil "" "nil")) nil) + ((string-match "^\"\\(\"+\\)?\"$" str) + (or (match-string 1 str) "")) + (t str))))) (attributes (let ((value (org-element-property attribute element))) (when value