1
0
Fork 0
mirror of https://github.com/emojisum/emojisum.git synced 2025-08-03 13:50:27 +00:00

emoji: fix the template output for markdown

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2017-02-07 14:09:07 -05:00
parent fdb51823d7
commit a9e159d830
Signed by: vbatts
GPG key ID: 10937E57733F1362
8 changed files with 855 additions and 301 deletions

View file

@ -1,5 +1,7 @@
package emoji
import "strings"
// Map returns the emoji at the provided position.
// This list is from 0-255
func Map(b byte) Words {
@ -25,3 +27,13 @@ type VersionedMap struct {
// Words are a set of options to represent an emoji.
// Possible options could be the ":colon_notion:" or a "U+26CF" style codepoint.
type Words []string
// IsColonNotation checks for whether a word is the :colon_notion: of emoji
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
func IsCodepoint(word string) bool {
return strings.HasPrefix(strings.ToUpper(word), "U+")
}