0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-11 07:11:32 -05:00

🐛 Fix incorrect percent number parsing on reading svg

This commit is contained in:
Andrey Antukh 2024-01-24 15:22:01 +01:00
parent 2950259f97
commit 3b929041f2

View file

@ -980,7 +980,7 @@
(fix-percent-attr-numeric [_ attr-val]
(let [is-percent? (str/ends-with? attr-val "%")]
(if is-percent?
(str (let [attr-num (d/parse-double attr-val)]
(str (let [attr-num (d/parse-double (str/rtrim attr-val "%"))]
(/ attr-num 100)))
attr-val)))