aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/cond/types.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/cond/types.go b/internal/cond/types.go
index 28a4fc9..62a6640 100644
--- a/internal/cond/types.go
+++ b/internal/cond/types.go
@@ -131,6 +131,11 @@ func (c *Cond) NameGroups() []int {
// groups maps a (type ...) group name to the extensions it expands to,
// spec Appendix A.
+// Group is the extensions a built-in type group holds - what (type image)
+// means - so a front end can treat a file the way the rules do rather than
+// keeping a second list of its own. The result is not to be modified.
+func Group(name string) []string { return groups[name] }
+
var groups = map[string][]string{
"image": {"jpg", "jpeg", "png", "gif", "webp", "bmp", "tif", "tiff", "heic", "heif", "avif", "svg", "ico", "raw", "cr2", "nef", "arw", "dng"},
"video": {"mp4", "mkv", "webm", "mov", "avi", "m4v", "mpg", "mpeg", "wmv", "flv", "3gp"},