[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 85a25e3 1/2: Merge branch 'maint'
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 85a25e3 1/2: Merge branch 'maint' |
Date: |
Sat, 10 Apr 2021 06:57:12 -0400 (EDT) |
branch: externals/org
commit 85a25e316927c08f01c7406e210905485ec857d0
Merge: 80bce04 19947a6
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Commit: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Merge branch 'maint'
---
lisp/ox.el | 10 ++++++----
testing/lisp/test-ox.el | 7 ++++++-
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/lisp/ox.el b/lisp/ox.el
index ff1f2ea..ffe280d 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -1386,11 +1386,13 @@ e.g., `org-export-create-backend'. It specifies which
back-end
specific items to read, if any."
(let ((line
(let ((s 0) alist)
- (while (string-match "\\(.+?\\):\\((.*?)\\|\\S-+\\)[ \t]*" options s)
+ (while (string-match "\\(.+?\\):\\((.*?)\\|\\S-+\\)?[ \t]*" options
s)
(setq s (match-end 0))
- (push (cons (match-string 1 options)
- (read (match-string 2 options)))
- alist))
+ (let ((value (match-string 2 options)))
+ (when value
+ (push (cons (match-string 1 options)
+ (read value))
+ alist))))
alist))
;; Priority is given to back-end specific options.
(all (append (org-export-get-all-options backend)
diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
index 0620086..34b2d20 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -163,7 +163,12 @@ num:2 <:active")))
(org-export--parse-option-keyword
"opt:t"
(org-export-create-backend
- :options '((:opt1 nil "opt") (:opt2 nil "opt")))))))
+ :options '((:opt1 nil "opt") (:opt2 nil "opt"))))))
+ ;; Ignore options with a missing value.
+ (should
+ (let ((options (org-export--parse-option-keyword "H: num:t")))
+ (and (not (plist-get options :headline-levels))
+ (plist-get options :section-numbers)))))
(ert-deftest test-org-export/get-inbuffer-options ()
"Test reading all standard export keywords."