mirror of
https://github.com/penpot/penpot.git
synced 2025-02-18 21:06:11 -05:00
🐛 Fix copy paste line break
This commit is contained in:
parent
58aa6b3666
commit
651d4f794b
1 changed files with 4 additions and 2 deletions
|
@ -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 %})])))]
|
||||||
|
;; if text is composed only by line breaks paragraphs is an empty list and should be nil
|
||||||
|
(when (d/not-empty? paragraphs)
|
||||||
{:type "root"
|
{:type "root"
|
||||||
:children [{:type "paragraph-set" :children paragraphs}]}))
|
:children [{:type "paragraph-set" :children paragraphs}]})))
|
||||||
|
|
||||||
(defn calculate-paste-position [state]
|
(defn calculate-paste-position [state]
|
||||||
(cond
|
(cond
|
||||||
|
|
Loading…
Add table
Reference in a new issue