premailer / css_parser

Ruby CSS Parser
Other
279 stars 110 forks source link

V2 Can we remove CssParser.convert_uris #157

Open stoivo opened 3 months ago

stoivo commented 3 months ago

I am looking to try to remove the use of regex and wonder if we can remove if feature completely CssParser.convert_uris

https://github.com/premailer/css_parser/blob/ab52436dbe238faeffffd0d08710f567c84fcf69/lib/css_parser.rb#L128-L156

It as added 17 years ago https://github.com/premailer/css_parser/commit/4215785086d550bff69596ee04b63984b7c36c04. I think when it's used in premailer we want to have all absolute urls not relative. If thats the reason we should that code should probably be in premailer instead.

Maybe we should just keep it to reduce the braking changes. Just want to ask

grosser commented 3 months ago

generally +1 for removing regex hackery, but hard to know who uses this 😞 If it's not causing trouble I'd in doubt leave it, but if it is then not against moving it