From 04b4243ad31d144c4caf9be4c5096a0f27a2648e Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Thu, 17 Sep 2026 00:23:51 +0200 Subject: gui: syntax colours, a file preview, and a settings window --- internal/cond/types.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'internal') 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"}, -- cgit v1.3