aboutsummaryrefslogtreecommitdiffstats
path: root/generate/generate.go
diff options
context:
space:
mode:
authorRose Hogenson <rosehogenson@posteo.net>2025-01-30 07:50:08 -0800
committerRose Hogenson <rosehogenson@posteo.net>2025-01-30 07:50:08 -0800
commit5481004f208c95dc74e9ea517ed584727b8e2a4d (patch)
treeebff6b160e8068e37fa2e2aced5f4ed7c9d070ad /generate/generate.go
parentClean up and simplify the code. (diff)
downloademoji-5481004f208c95dc74e9ea517ed584727b8e2a4d.tar.zst
Strip colons and commas from the short name
Diffstat (limited to 'generate/generate.go')
-rw-r--r--generate/generate.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/generate/generate.go b/generate/generate.go
index fe1caa3..9708972 100644
--- a/generate/generate.go
+++ b/generate/generate.go
@@ -169,7 +169,8 @@ func annotationsInFile(f io.Reader) (map[string]string, error) {
annotationsCombined := make(map[string]string, len(emojiAnnotations))
for emoji, annotation := range emojiAnnotations {
annotation.annotations = slices.DeleteFunc(annotation.annotations, func(s string) bool { return strings.Contains(annotation.name, s) })
- annotationsStr := annotation.name
+ annotationsStr := strings.ReplaceAll(annotation.name, ": ", " ")
+ annotationsStr = strings.ReplaceAll(annotationsStr, ", ", " ")
if len(annotation.annotations) > 0 {
annotationsStr += " " + strings.Join(annotation.annotations, " ")
}