(internal): make org-roam--org-link-file-bracket-re more intelligible (#749)

This commit is contained in:
Lyn Headley 2020-06-03 00:38:56 -04:00 committed by GitHub
parent b2594b84ae
commit 3ad43b0823
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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