enhance page-ref-un-bracket!

This solves some issue when renaming page.
1. The embeded references will be updated which was not supported before.
2. query supports orgmode link now.
This commit is contained in:
leizhe
2021-11-09 14:47:40 +08:00
committed by Tienson Qin
parent e881486a7c
commit 7e985ed7c9
2 changed files with 4 additions and 4 deletions

View File

@@ -53,10 +53,7 @@
(defn page-ref-un-brackets!
[s]
(when (string? s)
(if (page-ref? s)
(subs s 2 (- (count s) 2))
s)))
(or (get-page-name s) s))
(defn block-ref-un-brackets!
[s]

View File

@@ -10,6 +10,9 @@
"[single bracket]" nil
"no brackets" nil
"[[another page]]" "another page"
"[[nested [[page]]]]" "nested [[page]]"
"[[file:./page.org][page]]" "page"
"[[file:./pages/page.org][page]]" "page"