From 95c45dbd23af40d144533df00b5824793e72ea3a Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 27 Nov 2024 17:14:29 +0200 Subject: another fix --- internal/entry/entry.go | 3 ++- internal/entry/sharetags.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'internal') diff --git a/internal/entry/entry.go b/internal/entry/entry.go index d767410..3e21328 100644 --- a/internal/entry/entry.go +++ b/internal/entry/entry.go @@ -152,10 +152,11 @@ func (en Entry) HasTag(tag string) bool { } // Valid tags are: share:foo[,...] -// whereas foo can be a supported plutform such as linkedin, mastodon, etc. +// whereas foo can be a supported platform such as linkedin, mastodon, etc. // foo can also be prefixed with - to exclude it. See unit tests for examples. func (en Entry) PlatformExcluded(args config.Args, platformStr string) (bool, error) { s, err := newShareTags(args, en.tags) + fmt.Println(s) return slices.Contains(s.excludes, platformStr) || !slices.Contains(s.includes, platformStr), err } diff --git a/internal/entry/sharetags.go b/internal/entry/sharetags.go index 21421ab..fdbfa78 100644 --- a/internal/entry/sharetags.go +++ b/internal/entry/sharetags.go @@ -30,10 +30,10 @@ func newShareTags(args config.Args, tags map[string]struct{}) (shareTags, error) if len(s.includes) == 0 { for platformStr := range args.Platforms { - if slices.Contains(s.excludes, platformStr) { + if slices.Contains(s.excludes, strings.ToLower(platformStr)) { continue } - s.includes = append(s.includes, platformStr) + s.includes = append(s.includes, strings.ToLower(platformStr)) } } -- cgit v1.2.3