fix: block ref numbers not updated unless re-indexed

Close #1673

Also, fixed an issue that update the block in references doesn't work
This commit is contained in:
Tienson Qin
2021-05-14 17:58:36 +08:00
parent 50f34b7859
commit e94a09beff
3 changed files with 18 additions and 15 deletions

View File

@@ -2275,7 +2275,8 @@
(cond-> option
(:document/mode? config)
(assoc :class "doc-mode"))
(if (:group-by-page? config)
(if (and (:group-by-page? config)
(vector? (first blocks)))
[:div.flex.flex-col
(let [blocks (sort-by (comp :block/journal-day first) > blocks)]
(for [[page blocks] blocks]