summaryrefslogtreecommitdiff
path: root/internal/entry
diff options
context:
space:
mode:
Diffstat (limited to 'internal/entry')
-rw-r--r--internal/entry/entry.go3
-rw-r--r--internal/entry/sharetags.go4
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))
}
}