Skip to content

Commit

Permalink
fix: wrong input levels can result in multiple blocks with same left
Browse files Browse the repository at this point in the history
  • Loading branch information
tiensonqin committed May 5, 2021
1 parent fa08cff commit 6d53690
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/main/frontend/components/block.css
Expand Up @@ -101,6 +101,10 @@
}
}

.block-body ul, .block-body ol, .block-body dl {
margin-bottom: 2em;
}

.block-children {
border-left: 1px solid;
border-left-color: var(--ls-guideline-color, #ddd);
Expand Down
4 changes: 3 additions & 1 deletion src/main/frontend/format/block.cljs
Expand Up @@ -548,7 +548,9 @@
(let [parent (if uuid [:block/uuid uuid] (:page/id last-parent))
block (assoc block
:block/parent parent
:block/left parent)
:block/left parent
;; Fix wrong input levels
:block/level (inc level))
parents' (conj parents block)
result' (conj result block)]
[others parents' result'])
Expand Down

0 comments on commit 6d53690

Please sign in to comment.