diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2013-06-05 14:24:18 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2013-06-05 14:24:18 +0200 |
commit | 4b7006f444950811a1266feaf5b36d24d7a04cbf (patch) | |
tree | 4f6d7ef2dca1e821180cff96dc49da693e37e584 | |
parent | 53784ef861bcb71bcda9146a1b5a8d3ddaa7f975 (diff) | |
download | org-mode-4b7006f444950811a1266feaf5b36d24d7a04cbf.tar.gz |
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 "".
-rw-r--r-- | lisp/ox.el | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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 |