Forráskód Böngészése

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/
Ihor Radchenko 3 éve
szülő
commit
4dda0d7a8d
1 módosított fájl, 3 hozzáadás és 1 törlés
  1. 3 1
      lisp/org-element.el

+ 3 - 1
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))