mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 18:36:43 +00:00
fix: renaming a page without TITLE eats characters of the first line
Related to #1510
This commit is contained in:
@@ -147,11 +147,13 @@
|
||||
property-names (keys properties)]
|
||||
(and (every? #(contains? #{:title :filters} %) property-names)
|
||||
(let [ast (mldoc/->edn (:block/content block) (mldoc/default-config (:block/format block)))]
|
||||
(or
|
||||
(empty? (rest ast))
|
||||
(every? (fn [[[typ break-lines]] _]
|
||||
(and (= typ "Paragraph")
|
||||
(every? #(= % ["Break_Line"]) break-lines))) (rest ast))))))))
|
||||
(and
|
||||
(= "Properties" (ffirst (first ast)))
|
||||
(or
|
||||
(empty? (rest ast))
|
||||
(every? (fn [[[typ break-lines]] _]
|
||||
(and (= typ "Paragraph")
|
||||
(every? #(= % ["Break_Line"]) break-lines))) (rest ast)))))))))
|
||||
|
||||
(defn with-dummy-block
|
||||
([blocks format]
|
||||
|
||||
Reference in New Issue
Block a user