mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
fix: Sorting of Pagelinks in Query tables
This commit is contained in:
@@ -59,7 +59,7 @@ and handles unexpected failure."
|
||||
"Normalizes supported formats such as dates and percentages."
|
||||
([block]
|
||||
(->> [normalize-as-percentage normalize-as-date identity]
|
||||
(map #(% block))
|
||||
(map #(% (if (set? block) (first block) block)))
|
||||
(remove nil?)
|
||||
(first))))
|
||||
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
"2022-08-12T00:00:00Z"
|
||||
|
||||
"2022-08-12T00:00:00Z"
|
||||
"2022-08-12T00:00:00Z"
|
||||
|
||||
#{"Aug 12th, 2022"}
|
||||
"2022-08-12T00:00:00Z"
|
||||
|
||||
#{"2022-08-12T00:00:00Z"}
|
||||
"2022-08-12T00:00:00Z")))
|
||||
|
||||
(deftest test-normalize-percentage
|
||||
@@ -21,7 +27,10 @@
|
||||
0
|
||||
|
||||
"-5%"
|
||||
-0.05)))
|
||||
-0.05
|
||||
|
||||
#{"50%"}
|
||||
0.5)))
|
||||
|
||||
(deftest test-random-values
|
||||
(testing "random values should not be processed"
|
||||
|
||||
Reference in New Issue
Block a user