0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-12 07:41:43 -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] (fix-percent-attr-numeric [_ attr-val]
(let [is-percent? (str/ends-with? attr-val "%")] (let [is-percent? (str/ends-with? attr-val "%")]
(if is-percent? (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-num 100)))
attr-val))) attr-val)))