mirror of
https://github.com/logseq/logseq.git
synced 2026-04-26 15:15:01 +00:00
fix: schema.org classes missing from tree
also fix typos
This commit is contained in:
@@ -37,7 +37,15 @@
|
||||
(vector? parent-class*)
|
||||
(do (when verbose
|
||||
(println "Picked first class for multi-parent class" (pr-str (class-m "@id"))))
|
||||
(get (first parent-class*) "@id")))
|
||||
(get (first parent-class*) "@id"))
|
||||
;; DataTypes are weird in that they are subclassed from
|
||||
;; rdfs:class but that info is omitted. It seems schema
|
||||
;; does this on purpose to display it as a separate tree but
|
||||
;; we want all classes under one tree
|
||||
(contains? (set (as-> (class-m "@type") type'
|
||||
(if (string? type') [type'] type')))
|
||||
"schema:DataType")
|
||||
"schema:DataType")
|
||||
properties (sort (class-properties (class-m "@id")))]
|
||||
(cond-> {:block/original-name (string/replace-first (class-m "@id") "schema:" "")
|
||||
:block/type "class"
|
||||
@@ -166,6 +174,10 @@
|
||||
pages (mapv #(hash-map :page
|
||||
(->class-page % class-db-ids class-uuids class-to-properties property-uuids options))
|
||||
select-classes)]
|
||||
(assert (= ["Thing"] (keep #(when-not (:block/namespace (:page %))
|
||||
(:block/original-name (:page %)))
|
||||
pages))
|
||||
"Thing is the only class that doesn't have a parent class")
|
||||
pages))
|
||||
|
||||
(defn- generate-properties
|
||||
|
||||
@@ -14,4 +14,4 @@ aks = "aks"
|
||||
Mannor = "Mannor"
|
||||
nd = "nd"
|
||||
[files]
|
||||
extend-exclude = ["resources/*", "src/resources/*"]
|
||||
extend-exclude = ["resources/*", "src/resources/*", "scripts/resources/*"]
|
||||
|
||||
Reference in New Issue
Block a user