enhance(query): allow property keys with char '_'

related to #5445
pull/5600/head^2
Tienson Qin 2022-06-08 17:51:41 +08:00
parent da1e5fc3f8
commit 97fc51ead6
1 changed files with 6 additions and 1 deletions

View File

@ -114,6 +114,11 @@
page-ref (string/lower-case page-ref)]
(list 'contains? sym (text/page-ref-un-brackets! page-ref)))
(and (vector? f)
(= (first f) 'page-property)
(keyword? (util/nth-safe f 2)))
(update f 2 (fn [k] (keyword (string/replace (name k) "_" "-"))))
:else
f)) query)))