(internal): make org-roam--org-link-file-bracket-re more intelligible (#749)
This commit is contained in:
parent
b2594b84ae
commit
3ad43b0823
1 changed files with 11 additions and 2 deletions
13
org-roam.el
13
org-roam.el
|
@ -234,8 +234,17 @@ space-delimited strings.
|
|||
"Last window `org-roam' was called from.")
|
||||
|
||||
(defvar org-roam--org-link-file-bracket-re
|
||||
"\\[\\[file:\\(\\(?:[^][\\]\\|\\\\\\(?:\\\\\\\\\\)*[][]\\|\\\\+[^][]\\)+\\)]\\(?:\\[\\(\\(?:.\\|
|
||||
\\)+?\\)]\\)?]"
|
||||
(rx "[[file:" (seq (group (one-or-more (or (not (any "]" "[" "\\"))
|
||||
(seq "\\"
|
||||
(zero-or-more "\\\\")
|
||||
(any "[" "]"))
|
||||
(seq (one-or-more "\\")
|
||||
(not (any "]" "["))))))
|
||||
"]"
|
||||
(zero-or-one (seq "["
|
||||
(group (+? anything))
|
||||
"]"))
|
||||
"]"))
|
||||
"Matches a 'file:' link in double brackets.")
|
||||
|
||||
;;;; Utilities
|
||||
|
|
Loading…
Reference in a new issue