소스 검색

org-ts-regexp0: Fix matching timestamps with no day name

* lisp/org.el (org-ts-regexp1): Update regexp to match strings like
"2022-04-29 02:00" with no day name.

Reported-by: Russell Adams <RLAdams@adamsinfoserv.com>
Link: https://orgmode.org/list/87zgk8tc17.fsf@localhost
Ihor Radchenko 3 년 전
부모
커밋
b68c1666c2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -436,7 +436,7 @@ FULL is given."
 This one does not require the space after the date, so it can be used
 This one does not require the space after the date, so it can be used
 on a string that terminates immediately after the date.")
 on a string that terminates immediately after the date.")
 
 
-(defconst org-ts-regexp1 "\\(\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\) *\\([^]+0-9>\r\n -]*\\)\\( \\([0-9]\\{1,2\\}\\):\\([0-9]\\{2\\}\\)\\)?\\)"
+(defconst org-ts-regexp1 "\\(\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\)\\(?: *\\([^]+0-9>\r\n -]+\\)\\)?\\( \\([0-9]\\{1,2\\}\\):\\([0-9]\\{2\\}\\)\\)?\\)"
   "Regular expression matching time strings for analysis.")
   "Regular expression matching time strings for analysis.")
 
 
 (defconst org-ts-regexp2 (concat "<" org-ts-regexp1 "[^>\n]\\{0,16\\}>")
 (defconst org-ts-regexp2 (concat "<" org-ts-regexp1 "[^>\n]\\{0,16\\}>")