mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
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:
@@ -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]
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user