🐛 Fix problem when exporting penpot files

This commit is contained in:
alonso.torres 2022-05-18 15:52:45 +02:00
parent d666755159
commit 6a74f29f96
2 changed files with 15 additions and 12 deletions

View file

@ -584,6 +584,9 @@
(assert (string? basename))
(assert (set? used))
(if (> (count basename) 1000)
;; We skip generating names for long strings. If the name is too long the regex can hang
basename
(let [[prefix initial] (extract-numeric-suffix basename)]
(if (and (not prefix-first?)
(not (contains? used basename)))
@ -594,7 +597,7 @@
(str prefix "-" counter))]
(if (contains? used candidate)
(recur (inc counter))
candidate)))))))
candidate))))))))
(defn deep-mapm
"Applies a map function to an associative map and recurses over its children

View file

@ -811,7 +811,7 @@
:attrs)
image-data (get-svg-data :image node)
svg-data (or image-data pattern-data)]
(:xlink:href svg-data)))
(or (:href svg-data) (:xlink:href svg-data))))
(defn get-image-fill
[node]