mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 10:38:13 -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)
|
||||
(mapv #(hash-map :type "paragraph"
|
||||
:children [(merge txt/default-text-attrs {:text %})])))]
|
||||
{:type "root"
|
||||
:children [{:type "paragraph-set" :children paragraphs}]}))
|
||||
;; if text is composed only by line breaks paragraphs is an empty list and should be nil
|
||||
(when (d/not-empty? paragraphs)
|
||||
{:type "root"
|
||||
:children [{:type "paragraph-set" :children paragraphs}]})))
|
||||
|
||||
(defn calculate-paste-position [state]
|
||||
(cond
|
||||
|
|
Loading…
Add table
Reference in a new issue