Allow using wildcard mime types when copying from clipboard

This commit is contained in:
Kovid Goyal
2022-12-03 14:06:16 +05:30
parent 5c9c9a67bc
commit b644a42a48
2 changed files with 9 additions and 1 deletions

View File

@@ -156,6 +156,12 @@ func (self *Output) assign_mime_type(available_mimes []string, aliases map[strin
}
}
}
for _, mt := range available_mimes {
if matched, _ := filepath.Match(self.mime_type, mt); matched {
self.remote_mime_type = mt
return
}
}
if images.EncodableImageTypes[self.mime_type] {
for _, mt := range available_mimes {
if images.DecodableImageTypes[mt] {