Refine regexp for front-matter date extraction

This should solve the bug reported by Sven Seebeck where dates in the
org-timestamp style would lose their closing bracket after a rename
operation altered their front matter.

See issue 19 on the GitHub mirror:
<https://github.com/protesilaos/denote/issues/19>.
This commit is contained in:
Protesilaos Stavrou 2022-06-22 07:27:30 +03:00
parent ee4aed6376
commit 8394280f95
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA

View file

@ -43,7 +43,7 @@ The match that needs to be extracted is explicityly marked as
group 1.")
(defconst denote-retrieve--date-front-matter-regexp
"^\\(?:#\\+\\)?\\(?:date\\)\\s-*[:=]\\s-*[\"']?\\(?1:.*\\b\\)[\"']?"
"^\\(?:#\\+\\)?\\(?:date\\)\\s-*[:=]\\s-*[\"']?\\(?1:.*\\b]?\\)[\"']?"
"Regular expression for date key and value.
The match that needs to be extracted is explicityly marked as
group 1.")