Browse Source

fix: tags and alias doesn't support , in page properties

Tienson Qin 4 năm trước cách đây
mục cha
commit
ece503d22a
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      src/main/frontend/format/mldoc.cljs

+ 2 - 1
src/main/frontend/format/mldoc.cljs

@@ -86,9 +86,10 @@
           properties (->> (take-while directive? ast)
                           (map (fn [[_ k v]]
                                  (let [k (keyword (string/lower-case k))
+                                       comma? (contains? #{:tags :alias :roam_tags} k)
                                        v (if (contains? #{:title :description :roam_tags} k)
                                            v
-                                           (text/split-page-refs-without-brackets v))]
+                                           (text/split-page-refs-without-brackets v comma?))]
                                    [k v])))
                           (into {}))
           macro-properties (filter (fn [x] (= :macro (first x))) properties)