branch: externals/denote commit 8394280f959875e978c09c671836e946953de879 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
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>. --- denote-retrieve.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/denote-retrieve.el b/denote-retrieve.el index c8dcc09f81..fbd55347c5 100644 --- a/denote-retrieve.el +++ b/denote-retrieve.el @@ -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.")