0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-13 23:41:24 -05:00

🐛 Fix problem copy/paste svg text

This commit is contained in:
alonso.torres 2024-04-12 11:47:43 +02:00
parent fa00fed694
commit e636bdd0b0

View file

@ -1711,8 +1711,14 @@
(process-entry [[type data]]
(case type
:text
(if (str/empty? data)
(cond
(str/empty? data)
(rx/empty)
(re-find #"<svg\s" data)
(rx/of (paste-svg-text data))
:else
(rx/of (paste-text data)))
:transit
@ -1757,8 +1763,7 @@
text-data (some-> pdata wapi/extract-text)
transit-data (ex/ignoring (some-> text-data t/decode-str))]
(cond
(and (string? text-data)
(str/includes? text-data "<svg "))
(and (string? text-data) (re-find #"<svg\s" text-data))
(rx/of (paste-svg-text text-data))
(seq image-data)