mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
Regression in media type suffix lookup
Introduced in Hugo 0.82.0. Fixes #8406
This commit is contained in:
@@ -305,7 +305,7 @@ func (t Types) GetBySuffix(suffix string) (tp Type, si SuffixInfo, found bool) {
|
||||
}
|
||||
|
||||
func (m Type) hasSuffix(suffix string) bool {
|
||||
return strings.Contains(m.suffixesCSV, suffix)
|
||||
return strings.Contains(","+m.suffixesCSV+",", ","+suffix+",")
|
||||
}
|
||||
|
||||
// GetByMainSubType gets a media type given a main and a sub type e.g. "text" and "plain".
|
||||
|
Reference in New Issue
Block a user