branch: externals/org
commit 4dda0d7a8dab2497ca0721b680d1d79a8bdfb27d
Author: Ihor Radchenko <[email protected]>
Commit: Ihor Radchenko <[email protected]>
org-element: Fix org-element-timestamp-parser for incomplete ranges
* lisp/org-element.el (org-element-timestamp-parser): Use more strict
regexp to match second timestamp in timestamp--timestamp range.
Fixes https://list.orgmode.org/orgmode/87tuh88kjv.fsf@localhost/
---
lisp/org-element.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/org-element.el b/lisp/org-element.el
index 37a6ae7eed..d96ea3b6d6 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -3904,7 +3904,9 @@ Assume point is at the beginning of the timestamp."
(activep (eq (char-after) ?<))
(raw-value
(progn
- (looking-at
"\\([<[]\\(%%\\)?.*?\\)[]>]\\(?:--\\([<[].*?[]>]\\)\\)?")
+ (looking-at (concat "\\([<[]\\(%%\\)?.*?\\)[]>]\\(?:--\\("
+ org-ts-regexp-both
+ "\\)\\)?"))
(match-string-no-properties 0)))
(date-start (match-string-no-properties 1))
(date-end (match-string 3))