mirror of
https://github.com/penpot/penpot.git
synced 2026-09-14 07:59:36 +00:00
🐛 Fix copy paste line break
This commit is contained in:
parent
58aa6b3666
commit
651d4f794b
@ -1588,8 +1588,10 @@
|
|||||||
(map str/trim)
|
(map str/trim)
|
||||||
(mapv #(hash-map :type "paragraph"
|
(mapv #(hash-map :type "paragraph"
|
||||||
:children [(merge txt/default-text-attrs {:text %})])))]
|
:children [(merge txt/default-text-attrs {:text %})])))]
|
||||||
{:type "root"
|
;; if text is composed only by line breaks paragraphs is an empty list and should be nil
|
||||||
:children [{:type "paragraph-set" :children paragraphs}]}))
|
(when (d/not-empty? paragraphs)
|
||||||
|
{:type "root"
|
||||||
|
:children [{:type "paragraph-set" :children paragraphs}]})))
|
||||||
|
|
||||||
(defn calculate-paste-position [state]
|
(defn calculate-paste-position [state]
|
||||||
(cond
|
(cond
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user