diff options
| author | Paul Buetow <paul@buetow.org> | 2024-11-27 17:14:29 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-11-27 17:14:29 +0200 |
| commit | 95c45dbd23af40d144533df00b5824793e72ea3a (patch) | |
| tree | de862d32aa7c36c7918c59a45b6e81ab217bdabd /internal | |
| parent | 89d391bd37e27bc264e92911df12a78354be9a5f (diff) | |
another fix
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/entry/entry.go | 3 | ||||
| -rw-r--r-- | internal/entry/sharetags.go | 4 |
2 files changed, 4 insertions, 3 deletions
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)) } } |
