mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Improve minifier MIME type resolution
This commit also removes the deprecated `Suffix` from MediaType. Now use `Suffixes` and put the MIME type suffix in the type, e.g. `application/svg+xml`. Fixes #5093
This commit is contained in:
@@ -93,11 +93,9 @@ func TestGetFormatByExt(t *testing.T) {
|
||||
|
||||
func TestGetFormatByFilename(t *testing.T) {
|
||||
noExtNoDelimMediaType := media.TextType
|
||||
noExtNoDelimMediaType.OldSuffix = ""
|
||||
noExtNoDelimMediaType.Delimiter = ""
|
||||
|
||||
noExtMediaType := media.TextType
|
||||
noExtMediaType.OldSuffix = ""
|
||||
|
||||
var (
|
||||
noExtDelimFormat = Format{
|
||||
|
Reference in New Issue
Block a user