branch: externals/denote
commit 19c4fa8b092f694b69024eed892a7593902194f4
Merge: 47073aa2a0 0b69904020
Author: Protesilaos Stavrou <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #64 from pprevos/main
Regex to allow for non-ASCII characters in title and tags
---
denote-faces.el | 4 ++--
denote.el | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/denote-faces.el b/denote-faces.el
index b58cc67610..25e09fdedd 100644
--- a/denote-faces.el
+++ b/denote-faces.el
@@ -85,8 +85,8 @@ and seconds."
;; For character classes, evaluate: (info "(elisp) Char Classes")
(defvar denote-faces--file-name-regexp
(concat "\\(?1:[0-9]\\{8\\}\\)\\(?2:T[0-9]\\{6\\}\\)"
- "\\(?:\\(?3:--\\)\\(?4:[[:alnum:]-]*\\)\\)?"
- "\\(?:\\(?5:__\\)\\(?6:[[:alnum:]_-]*\\)\\)?"
+ "\\(?:\\(?3:--\\)\\(?4:[[:alnum:][:nonascii:]-]*\\)\\)?"
+ "\\(?:\\(?5:__\\)\\(?6:[[:alnum:][:nonascii:]_-]*\\)\\)?"
"\\(?7:\\..*\\)?$")
"Regexp of file names for fontification.")
diff --git a/denote.el b/denote.el
index 1d3ef229bd..c0fc3450fb 100644
--- a/denote.el
+++ b/denote.el
@@ -315,10 +315,10 @@ are described in the doc string of `format-time-string'."
(defconst denote--id-regexp "\\([0-9]\\{8\\}\\)\\(T[0-9]\\{6\\}\\)"
"Regular expression to match `denote--id-format'.")
-(defconst denote--title-regexp "--\\([[:alnum:]-]*\\)"
+(defconst denote--title-regexp "--\\([[:alnum:][:nonascii:]-]*\\)"
"Regular expression to match the title field.")
-(defconst denote--keywords-regexp "__\\([[:alnum:]_-]*\\)"
+(defconst denote--keywords-regexp "__\\([[:alnum:][:nonascii:]_-]*\\)"
"Regular expression to match keywords.")
(defconst denote--extension-regexp "\\.\\(org\\|md\\|txt\\)"