mirror of
https://github.com/penpot/penpot.git
synced 2026-04-26 11:48:28 +00:00
🐛 Fix copy paste line break
This commit is contained in:
parent
58aa6b3666
commit
651d4f794b
@ -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…
x
Reference in New Issue
Block a user