Pārlūkot izejas kodu

Remove last use of :block/unordered

This was coming directly from the block's ast so it was harder to trace
Gabriel Horner 2 gadi atpakaļ
vecāks
revīzija
ba53bf297c

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

@@ -560,12 +560,12 @@
                        :level (if unordered? (:level block) 1))
                 block)
         block (cond->
-                (-> (assoc block
-                           :uuid id
-                           :refs ref-pages-in-properties
-                           :format format
-                           :meta pos-meta)
-                    (dissoc :size))
+               (-> (assoc block
+                          :uuid id
+                          :refs ref-pages-in-properties
+                          :format format
+                          :meta pos-meta)
+                   (dissoc :size :unordered))
                 (or (seq (:properties properties)) markdown-heading?)
                 (assoc :properties (with-heading-property (:properties properties) markdown-heading? (:size block))
                        :properties-text-values (:properties-text-values properties)

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

@@ -153,7 +153,7 @@
   ;; only increase over time as the docs graph rarely has deletions
   (testing "Counts"
     (is (= 303 (count files)) "Correct file count")
-    (is (= 69280 (count (d/datoms db :eavt))) "Correct datoms count")
+    (is (= 63632 (count (d/datoms db :eavt))) "Correct datoms count")
 
     (is (= 5866
            (ffirst

+ 1 - 2
src/main/frontend/modules/file/core.cljs

@@ -32,7 +32,7 @@
     content))
 
 (defn transform-content
-  [{:block/keys [collapsed? format pre-block? unordered content left page parent properties] :as b} level {:keys [heading-to-list?]}]
+  [{:block/keys [collapsed? format pre-block? content left page parent properties] :as b} level {:keys [heading-to-list?]}]
   (let [block-ref-not-saved? (and (seq (:block/_refs (db/entity (:db/id b))))
                                   (not (string/includes? content (str (:block/uuid b)))))
         heading (:heading properties)
@@ -50,7 +50,6 @@
                   :else
                   (let [markdown-top-heading? (and markdown?
                                                    (= parent page)
-                                                   (not unordered)
                                                    heading)
                         [prefix spaces-tabs]
                         (cond

+ 1 - 1
src/test/frontend/handler/repo_conversion_test.cljs

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