Bläddra i källkod

Revert: don't parse some special property key values as pages

Produced two many extra pages.
llcc 3 år sedan
förälder
incheckning
54a7e61b26

+ 7 - 12
deps/graph-parser/src/logseq/graph_parser/block.cljs

@@ -167,18 +167,13 @@
                    (map last)
                    (map (fn [v]
                           (cond
-                            (and (string? v) (not (string/blank? v)))
-                            (let [v (string/trim v)]
-                              (when-not (or (gp-mldoc/link? format v)
-                                            (= v "true")
-                                            (= v "false")
-                                            (parse-long v))
-                                (let [result (if (gp-util/wrapped-by-quotes? v)
-                                               (gp-util/unquote-string v)
-                                               (text/split-page-refs-without-brackets v {:un-brackets? false}))]
-                                  (if (coll? result)
-                                    (map text/page-ref-un-brackets! result)
-                                    [result]))))
+                            (and (string? v)
+                                 (not (gp-mldoc/link? format v)))
+                            (let [v (string/trim v)
+                                  result (text/split-page-refs-without-brackets v {:un-brackets? false})]
+                              (if (coll? result)
+                                (map text/page-ref-un-brackets! result)
+                                []))
 
                             (coll? v)
                             (map (fn [s]

+ 1 - 1
deps/graph-parser/src/logseq/graph_parser/test/docs_graph_helper.cljs

@@ -142,7 +142,7 @@
   ;; only increase over time as the docs graph rarely has deletions
   (testing "Counts"
     (is (= 211 (count files)) "Correct file count")
-    (is (= 41583 (count (d/datoms db :eavt))) "Correct datoms count")
+    (is (= 41290 (count (d/datoms db :eavt))) "Correct datoms count")
 
     (is (= 3600
            (ffirst

+ 1 - 1
deps/graph-parser/test/logseq/graph_parser/block_test.cljs

@@ -28,7 +28,7 @@
     (are [x y] (= (vec (:page-refs
                         (gp-block/extract-properties :markdown x {:property-pages/enabled? true}))) y)
          [["year" "1000"]] ["year"]
-         [["year" "\"1000\""]] ["1000" "year"]
+         [["year" "\"1000\""]] ["year"]
          [["year" "1000"] ["month" "12"]] ["year" "month"]
          [["foo" "[[bar]] test"]] ["bar" "test" "foo"]
          [["foo" "[[bar]] test [[baz]]"]] ["bar" "test" "baz" "foo"]