jhillyerd / enmime

MIME mail encoding and decoding package for Go
MIT License
461 stars 100 forks source link

feat: skip empty parameters #313

Closed milankonir closed 9 months ago

milankonir commented 9 months ago

Looks like there was never a proper condition for filtering out empty parameters. It kinda worked thanks to this https://github.com/jhillyerd/enmime/blob/main/mediatype/mediatype.go#L125-L128 (= substring would always match if there was at least one parameter already added to mtype). It did not work if the empty parameter was the first parameter.

coveralls commented 9 months ago

Coverage Status

coverage: 86.213% (+0.01%) from 86.199% when pulling 7c1c20c1a63e43256bdca9a6dbacd5e6e03e4713 on milankonir:fix-mangled-unnamed-parameter into ea70bfea9ada861ce060092bb38af189e8fe0a7e on jhillyerd:main.

jhillyerd commented 9 months ago

Thanks!