Merge pull request #24 from emojisum/002

emoji: a couple of flags (it's the letters)
This commit is contained in:
Vincent Batts 2018-10-15 13:33:31 -04:00 committed by GitHub
commit 1d0526c5b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -240,10 +240,10 @@
[":turtle:"],
[":carousel_horse:", "U+1F3A0"],
[":two_women_holding_hands:", ":two_men_holding_hands:", ":couple:", "U+1F46C ", "U+1F46D", "U+1F46B"],
[":uk:"],
[":uk:", "U+1F1EC", "U+1F1E7"],
[":umbrella:"],
[":unlock:"],
[":us:"],
[":us:", "U+1F1FA", "U+1F1F8"],
[":v:"],
[":vhs:"],
[":violin:"],

View File

@ -28,7 +28,8 @@ type VersionedMap struct {
}
// Words are a set of options to represent an emoji.
// Possible options could be the ":colon_notation:" or a "U+26CF" style codepoint.
// Possible options could be the ":colon_notation:", a "U+26CF" style
// codepoint, or the unicode value itself.
type Words []string
// IsColonNotation checks for whether a word is the :colon_notation: of emoji
@ -36,7 +37,7 @@ func IsColonNotation(word string) bool {
return strings.HasPrefix(word, ":") && strings.HasSuffix(word, ":")
}
// IsCodepoint checks for whether a word is the "U+1234" codepoint style of emoji
// IsCodepoint checks for whether a word is the "U+1234" codepoint style of emoji. Codepoints can sometimes be a combo, like flags
func IsCodepoint(word string) bool {
return strings.HasPrefix(strings.ToUpper(word), "U+")
}