Open tuncbkose opened 3 months ago
Hi, I just noticed that some of my svg files, obtained for example from dvisvgm, specify their size with width='{number}pt' and height='{number}pt'. For these files, the regex in https://github.com/shibukawa/imagesize_py/blob/8d88ec6b646d6184b5633604551d6fc154783073/imagesize/imagesize.py#L204-L215 doesn't match due to the different quotation marks.
dvisvgm
width='{number}pt'
height='{number}pt'
I imagine one can naively change the regex to have something like ["|'], but then you would be matching incorrect strings like "wrong'. I'm sure this is a solved problem that is beyond my regex knowledge, but it would be nice for this to be fixed.
["|']
"wrong'
Hi, I just noticed that some of my svg files, obtained for example from
dvisvgm
, specify their size withwidth='{number}pt'
andheight='{number}pt'
. For these files, the regex in https://github.com/shibukawa/imagesize_py/blob/8d88ec6b646d6184b5633604551d6fc154783073/imagesize/imagesize.py#L204-L215 doesn't match due to the different quotation marks.I imagine one can naively change the regex to have something like
["|']
, but then you would be matching incorrect strings like"wrong'
. I'm sure this is a solved problem that is beyond my regex knowledge, but it would be nice for this to be fixed.