Created
March 6, 2015 18:40
-
-
Save tanakahisateru/19f8bb91b63c37acdf53 to your computer and use it in GitHub Desktop.
My Emoji parser for cebe/markdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| return [ | |
| "smile" => "1f604", | |
| "laughing" => "1f606", | |
| "blush" => "1f60a", | |
| "smiley" => "1f603", | |
| "relaxed" => "263a", | |
| "smirk" => "1f60f", | |
| "heart-eyes" => "1f60d", | |
| "kissing-heart" => "1f618", | |
| "kissing-closed-eyes" => "1f61a", | |
| "flushed" => "1f633", | |
| "relieved" => "1f625", | |
| "satisfied" => "1f60c", | |
| "grin" => "1f601", | |
| "wink" => "1f609", | |
| "stuck-out-tongue-winking-eye" => "1f61c", | |
| "stuck-out-tongue-closed-eyes" => "1f61d", | |
| "grinning" => "1f600", | |
| "kissing" => "1f617", | |
| "kissing-smiling-eyes" => "1f619", | |
| "stuck-out-tongue" => "1f61b", | |
| "sleeping" => "1f634", | |
| "worried" => "1f61f", | |
| "frowning" => "1f626", | |
| "anguished" => "1f627", | |
| "open-mouth" => "1f62e", | |
| "grimacing" => "1f62c", | |
| "confused" => "1f615", | |
| "hushed" => "1f62f", | |
| "expressionless" => "1f611", | |
| "unamused" => "1f612", | |
| "sweat-smile" => "1f605", | |
| "sweat" => "1f613", | |
| "weary" => "1f629", | |
| "pensive" => "1f614", | |
| "disappointed" => "1f61e", | |
| "confounded" => "1f616", | |
| "fearful" => "1f628", | |
| "cold-sweat" => "1f630", | |
| "persevere" => "1f623", | |
| "cry" => "1f622", | |
| "sob" => "1f62d", | |
| "joy" => "1f602", | |
| "astonished" => "1f632", | |
| "scream" => "1f631", | |
| "tired-face" => "1f62b", | |
| "angry" => "1f620", | |
| "rage" => "1f621", | |
| "triumph" => "1f624", | |
| "sleepy" => "1f62a", | |
| "yum" => "1f60b", | |
| "mask" => "1f637", | |
| "sunglasses" => "1f60e", | |
| "dizzy-face" => "1f635", | |
| "imp" => "1f47f", | |
| "smiling-imp" => "1f608", | |
| "neutral-face" => "1f610", | |
| "no-mouth" => "1f636", | |
| "innocent" => "1f607", | |
| "alien" => "1f47d", | |
| "yellow-heart" => "1f49b", | |
| "blue-heart" => "1f499", | |
| "purple-heart" => "1f49c", | |
| "heart" => "2764", | |
| "green-heart" => "1f49a", | |
| "broken-heart" => "1f494", | |
| "heartbeat" => "1f493", | |
| "heartpulse" => "1f497", | |
| "two-hearts" => "1f495", | |
| "revolving-hearts" => "1f49e", | |
| "cupid" => "1f498", | |
| "sparkling-heart" => "1f496", | |
| "sparkles" => "2728", | |
| "star" => "2b50", | |
| "star2" => "1f31f", | |
| "dizzy" => "1f4ab", | |
| "boom" => "1f4a5", | |
| "anger" => "1f4a2", | |
| "exclamation" => "2757", | |
| "question" => "2753", | |
| "grey-exclamation" => "2755", | |
| "grey-question" => "2754", | |
| "zzz" => "1f4a4", | |
| "dash" => "1f4a8", | |
| "sweat-drops" => "1f4a6", | |
| "notes" => "1f3b6", | |
| "musical-note" => "1f3b5", | |
| "fire" => "1f525", | |
| "poop" => "1f4a9", | |
| "thumbsup" => "1f44d", | |
| "thumbsdown" => "1f44e", | |
| "ok-hand" => "1f44c", | |
| "punch" => "1f44a", | |
| "fist" => "270a", | |
| "v" => "270c", | |
| "wave" => "1f44b", | |
| "hand" => "270b", | |
| "open-hands" => "1f450", | |
| "point-up" => "261d", | |
| "point-down" => "1f447", | |
| "point-left" => "1f448", | |
| "point-right" => "1f449", | |
| "raised-hands" => "1f64c", | |
| "pray" => "1f64f", | |
| "point-up-2" => "1f446", | |
| "clap" => "1f44f", | |
| "muscle" => "1f4aa", | |
| "walking" => "1f6b6", | |
| "runner" => "1f3c3", | |
| "couple" => "1f46b", | |
| "family" => "1f46a", | |
| "two-men-holding-hands" => "1f46c", | |
| "two-women-holding-hands" => "1f46d", | |
| "dancer" => "1f483", | |
| "dancers" => "1f46f", | |
| "ok-woman" => "1f646", | |
| "no-good" => "1f645", | |
| "information-desk-person" => "1f481", | |
| "raised-hand" => "1f64b", | |
| "bride-with-veil" => "1f470", | |
| "person-with-pouting-face" => "1f64e", | |
| "person-frowning" => "1f64d", | |
| "bow" => "1f647", | |
| "couplekiss" => "1f48f", | |
| "couple-with-heart" => "1f491", | |
| "massage" => "1f486", | |
| "haircut" => "1f487", | |
| "nail-care" => "1f485", | |
| "boy" => "1f466", | |
| "girl" => "1f467", | |
| "woman" => "1f469", | |
| "man" => "1f468", | |
| "baby" => "1f476", | |
| "older-woman" => "1f475", | |
| "older-man" => "1f474", | |
| "person-with-blond-hair" => "1f471", | |
| "man-with-gua-pi-mao" => "1f472", | |
| "man-with-turban" => "1f473", | |
| "construction-worker" => "1f477", | |
| "cop" => "1f46e", | |
| "angel" => "1f47c", | |
| "princess" => "1f478", | |
| "smiley-cat" => "1f63a", | |
| "smile-cat" => "1f638", | |
| "heart-eyes-cat" => "1f63b", | |
| "kissing-cat" => "1f63d", | |
| "smirk-cat" => "1f63c", | |
| "scream-cat" => "1f640", | |
| "crying-cat-face" => "1f63f", | |
| "joy-cat" => "1f639", | |
| "pouting-cat" => "1f63e", | |
| "japanese-ogre" => "1f479", | |
| "japanese-goblin" => "1f47a", | |
| "see-no-evil" => "1f648", | |
| "hear-no-evil" => "1f649", | |
| "speak-no-evil" => "1f64a", | |
| "guardsman" => "1f482", | |
| "skull" => "1f480", | |
| "feet" => "1f463", | |
| "lips" => "1f444", | |
| "kiss" => "1f48b", | |
| "droplet" => "1f4a7", | |
| "ear" => "1f442", | |
| "eyes" => "1f440", | |
| "nose" => "1f443", | |
| "tongue" => "1f445", | |
| "love-letter" => "1f48c", | |
| "bust-in-silhouette" => "1f464", | |
| "busts-in-silhouette" => "1f465", | |
| "speech-balloon" => "1f4ac", | |
| "thought-balloon" => "1f4ad", | |
| "sunny" => "2600", | |
| "umbrella" => "2614", | |
| "cloud" => "2601", | |
| "snowflake" => "2744", | |
| "snowman" => "26c4", | |
| "zap" => "26a1", | |
| "cyclone" => "1f300", | |
| "foggy" => "1f301", | |
| "ocean" => "1f30a", | |
| "cat" => "1f431", | |
| "dog" => "1f436", | |
| "mouse" => "1f42d", | |
| "hamster" => "1f439", | |
| "rabbit" => "1f430", | |
| "wolf" => "1f43a", | |
| "frog" => "1f438", | |
| "tiger" => "1f42f", | |
| "koala" => "1f428", | |
| "bear" => "1f43b", | |
| "pig" => "1f437", | |
| "pig-nose" => "1f43d", | |
| "cow" => "1f42e", | |
| "boar" => "1f417", | |
| "monkey-face" => "1f435", | |
| "monkey" => "1f412", | |
| "horse" => "1f434", | |
| "racehorse" => "1f40e", | |
| "camel" => "1f42b", | |
| "sheep" => "1f411", | |
| "elephant" => "1f418", | |
| "panda-face" => "1f43c", | |
| "snake" => "1f40d", | |
| "bird" => "1f426", | |
| "baby-chick" => "1f424", | |
| "hatched-chick" => "1f425", | |
| "hatching-chick" => "1f423", | |
| "chicken" => "1f414", | |
| "penguin" => "1f427", | |
| "turtle" => "1f422", | |
| "bug" => "1f41b", | |
| "honeybee" => "1f41d", | |
| "ant" => "1f41c", | |
| "beetle" => "1f41e", | |
| "snail" => "1f40c", | |
| "octopus" => "1f419", | |
| "tropical-fish" => "1f420", | |
| "fish" => "1f41f", | |
| "whale" => "1f433", | |
| "whale2" => "1f40b", | |
| "dolphin" => "1f42c", | |
| "cow2" => "1f404", | |
| "ram" => "1f40f", | |
| "rat" => "1f400", | |
| "water-buffalo" => "1f403", | |
| "tiger2" => "1f405", | |
| "rabbit2" => "1f407", | |
| "dragon" => "1f409", | |
| "goat" => "1f410", | |
| "rooster" => "1f413", | |
| "dog2" => "1f415", | |
| "pig2" => "1f416", | |
| "mouse2" => "1f401", | |
| "ox" => "1f402", | |
| "dragon-face" => "1f432", | |
| "blowfish" => "1f421", | |
| "crocodile" => "1f40a", | |
| "dromedary-camel" => "1f42a", | |
| "leopard" => "1f406", | |
| "cat2" => "1f408", | |
| "poodle" => "1f429", | |
| "paw-prints" => "1f43e", | |
| "bouquet" => "1f490", | |
| "cherry-blossom" => "1f338", | |
| "tulip" => "1f337", | |
| "four-leaf-clover" => "1f340", | |
| "rose" => "1f339", | |
| "sunflower" => "1f33b", | |
| "hibiscus" => "1f33a", | |
| "maple-leaf" => "1f341", | |
| "leaves" => "1f343", | |
| "fallen-leaf" => "1f342", | |
| "herb" => "1f33f", | |
| "mushroom" => "1f344", | |
| "cactus" => "1f335", | |
| "palm-tree" => "1f334", | |
| "evergreen-tree" => "1f332", | |
| "deciduous-tree" => "1f333", | |
| "chestnut" => "1f330", | |
| "seedling" => "1f331", | |
| "blossom" => "1f33c", | |
| "ear-of-rice" => "1f33e", | |
| "shell" => "1f41a", | |
| "globe-with-meridians" => "1f310", | |
| "sun-with-face" => "1f31e", | |
| "full-moon-with-face" => "1f31d", | |
| "new-moon-with-face" => "1f31a", | |
| "new-moon" => "1f311", | |
| "waxing-crescent-moon" => "1f312", | |
| "first-quarter-moon" => "1f313", | |
| "waxing-gibbous-moon" => "1f314", | |
| "full-moon" => "1f315", | |
| "waning-gibbous-moon" => "1f316", | |
| "last-quarter-moon" => "1f317", | |
| "waning-crescent-moon" => "1f318", | |
| "last-quarter-moon-with-face" => "1f31c", | |
| "first-quarter-moon-with-face" => "1f31b", | |
| "moon" => "1f319", | |
| "earth-africa" => "1f30d", | |
| "earth-americas" => "1f30e", | |
| "earth-asia" => "1f30f", | |
| "volcano" => "1f30b", | |
| "milky-way" => "1f30c", | |
| "partly-sunny" => "26c5", | |
| "bamboo" => "1f38d", | |
| "gift-heart" => "1f49d", | |
| "dolls" => "1f38e", | |
| "school-satchel" => "1f392", | |
| "mortar-board" => "1f393", | |
| "flags" => "1f38f", | |
| "fireworks" => "1f386", | |
| "sparkler" => "1f387", | |
| "wind-chime" => "1f390", | |
| "rice-scene" => "1f391", | |
| "jack-o-lantern" => "1f383", | |
| "ghost" => "1f47b", | |
| "santa" => "1f385", | |
| "8ball" => "1f3b1", | |
| "alarm-clock" => "23f0", | |
| "apple" => "1f34e", | |
| "art" => "1f3a8", | |
| "baby-bottle" => "1f37c", | |
| "balloon" => "1f388", | |
| "banana" => "1f34c", | |
| "bar-chart" => "1f4ca", | |
| "baseball" => "26be", | |
| "basketball" => "1f3c0", | |
| "bath" => "1f6c0", | |
| "bathtub" => "1f6c1", | |
| "battery" => "1f50b", | |
| "beer" => "1f37a", | |
| "beers" => "1f37b", | |
| "bell" => "1f514", | |
| "bento" => "1f371", | |
| "bicyclist" => "1f6b4", | |
| "bikini" => "1f459", | |
| "birthday" => "1f382", | |
| "black-joker" => "1f0cf", | |
| "black-nib" => "2712", | |
| "blue-book" => "1f4d8", | |
| "bomb" => "1f4a3", | |
| "bookmark" => "1f516", | |
| "bookmark-tabs" => "1f4d1", | |
| "books" => "1f4da", | |
| "boot" => "1f462", | |
| "bowling" => "1f3b3", | |
| "bread" => "1f35e", | |
| "briefcase" => "1f4bc", | |
| "bulb" => "1f4a1", | |
| "cake" => "1f370", | |
| "calendar" => "1f4c6", | |
| "calling" => "1f4f2", | |
| "camera" => "1f4f7", | |
| "candy" => "1f36c", | |
| "card-index" => "1f4c7", | |
| "cd" => "1f4bf", | |
| "chart-with-downwards-trend" => "1f4c9", | |
| "chart-with-upwards-trend" => "1f4c8", | |
| "cherries" => "1f352", | |
| "chocolate-bar" => "1f36b", | |
| "christmas-tree" => "1f384", | |
| "clapper" => "1f3ac", | |
| "clipboard" => "1f4cb", | |
| "closed-book" => "1f4d5", | |
| "closed-lock-with-key" => "1f510", | |
| "closed-umbrella" => "1f302", | |
| "clubs" => "2663", | |
| "cocktail" => "1f378", | |
| "coffee" => "2615", | |
| "computer" => "1f4bb", | |
| "confetti-ball" => "1f38a", | |
| "cookie" => "1f36a", | |
| "corn" => "1f33d", | |
| "credit-card" => "1f4b3", | |
| "crown" => "1f451", | |
| "crystal-ball" => "1f52e", | |
| "curry" => "1f35b", | |
| "custard" => "1f36e", | |
| "dango" => "1f361", | |
| "dart" => "1f3af", | |
| "date" => "1f4c5", | |
| "diamonds" => "2666", | |
| "dollar" => "1f4b5", | |
| "door" => "1f6aa", | |
| "doughnut" => "1f369", | |
| "dress" => "1f457", | |
| "dvd" => "1f4c0", | |
| "e-mail" => "1f4e7", | |
| "egg" => "1f373", | |
| "eggplant" => "1f346", | |
| "electric-plug" => "1f50c", | |
| "email" => "2709", | |
| "euro" => "1f4b6", | |
| "eyeglasses" => "1f453", | |
| "fax" => "1f4e0", | |
| "file-folder" => "1f4c1", | |
| "fish-cake" => "1f365", | |
| "fishing-pole-and-fish" => "1f3a3", | |
| "flashlight" => "1f526", | |
| "floppy-disk" => "1f4be", | |
| "flower-playing-cards" => "1f3b4", | |
| "football" => "1f3c8", | |
| "fork-and-knife" => "1f374", | |
| "fried-shrimp" => "1f364", | |
| "fries" => "1f35f", | |
| "game-die" => "1f3b2", | |
| "gem" => "1f48e", | |
| "gift" => "1f381", | |
| "golf" => "26f3", | |
| "grapes" => "1f347", | |
| "green-apple" => "1f34f", | |
| "green-book" => "1f4d7", | |
| "guitar" => "1f3b8", | |
| "gun" => "1f52b", | |
| "hamburger" => "1f354", | |
| "hammer" => "1f528", | |
| "handbag" => "1f45c", | |
| "headphones" => "1f3a7", | |
| "hearts" => "2665", | |
| "high-brightness" => "1f506", | |
| "high-heel" => "1f460", | |
| "hocho" => "1f52a", | |
| "honey-pot" => "1f36f", | |
| "horse-racing" => "1f3c7", | |
| "hourglass" => "231b", | |
| "hourglass-flowing-sand" => "23f3", | |
| "ice-cream" => "1f368", | |
| "icecream" => "1f366", | |
| "inbox-tray" => "1f4e5", | |
| "incoming-envelope" => "1f4e8", | |
| "iphone" => "1f4f1", | |
| "jeans" => "1f456", | |
| "key" => "1f511", | |
| "kimono" => "1f458", | |
| "ledger" => "1f4d2", | |
| "lemon" => "1f34b", | |
| "lipstick" => "1f484", | |
| "lock" => "1f512", | |
| "lock-with-ink-pen" => "1f50f", | |
| "lollipop" => "1f36d", | |
| "loop" => "27bf", | |
| "loudspeaker" => "1f4e2", | |
| "low-brightness" => "1f505", | |
| "mag" => "1f50d", | |
| "mag-right" => "1f50e", | |
| "mahjong" => "1f004", | |
| "mailbox" => "1f4eb", | |
| "mailbox-closed" => "1f4ea", | |
| "mailbox-with-mail" => "1f4ec", | |
| "mailbox-with-no-mail" => "1f4ed", | |
| "mans-shoe" => "1f45e", | |
| "meat-on-bone" => "1f356", | |
| "mega" => "1f4e3", | |
| "melon" => "1f348", | |
| "memo" => "1f4dd", | |
| "microphone" => "1f3a4", | |
| "microscope" => "1f52c", | |
| "minidisc" => "1f4bd", | |
| "money-with-wings" => "1f4b8", | |
| "moneybag" => "1f4b0", | |
| "mountain-bicyclist" => "1f6b5", | |
| "movie-camera" => "1f3a5", | |
| "musical-keyboard" => "1f3b9", | |
| "musical-score" => "1f3bc", | |
| "mute" => "1f507", | |
| "name-badge" => "1f4db", | |
| "necktie" => "1f454", | |
| "newspaper" => "1f4f0", | |
| "no-bell" => "1f515", | |
| "notebook" => "1f4d3", | |
| "notebook-with-decorative-cover" => "1f4d4", | |
| "nut-and-bolt" => "1f529", | |
| "oden" => "1f362", | |
| "open-file-folder" => "1f4c2", | |
| "orange-book" => "1f4d9", | |
| "outbox-tray" => "1f4e4", | |
| "page-facing-up" => "1f4c4", | |
| "page-with-curl" => "1f4c3", | |
| "pager" => "1f4df", | |
| "paperclip" => "1f4ce", | |
| "peach" => "1f351", | |
| "pear" => "1f350", | |
| "pencil2" => "270f", | |
| "phone" => "260e", | |
| "pill" => "1f48a", | |
| "pineapple" => "1f34d", | |
| "pizza" => "1f355", | |
| "postal-horn" => "1f4ef", | |
| "postbox" => "1f4ee", | |
| "pouch" => "1f45d", | |
| "poultry-leg" => "1f357", | |
| "pound" => "1f4b7", | |
| "purse" => "1f45b", | |
| "pushpin" => "1f4cc", | |
| "radio" => "1f4fb", | |
| "ramen" => "1f35c", | |
| "ribbon" => "1f380", | |
| "rice" => "1f35a", | |
| "rice-ball" => "1f359", | |
| "rice-cracker" => "1f358", | |
| "ring" => "1f48d", | |
| "rugby-football" => "1f3c9", | |
| "running-shirt-with-sash" => "1f3bd", | |
| "sake" => "1f376", | |
| "sandal" => "1f461", | |
| "satellite" => "1f4e1", | |
| "saxophone" => "1f3b7", | |
| "scissors" => "2702", | |
| "scroll" => "1f4dc", | |
| "seat" => "1f4ba", | |
| "shaved-ice" => "1f367", | |
| "shirt" => "1f455", | |
| "shower" => "1f6bf", | |
| "ski" => "1f3bf", | |
| "smoking" => "1f6ac", | |
| "snowboarder" => "1f3c2", | |
| "soccer" => "26bd", | |
| "sound" => "1f509", | |
| "space-invader" => "1f47e", | |
| "spades" => "2660", | |
| "spaghetti" => "1f35d", | |
| "speaker" => "1f50a", | |
| "stew" => "1f372", | |
| "straight-ruler" => "1f4cf", | |
| "strawberry" => "1f353", | |
| "surfer" => "1f3c4", | |
| "sushi" => "1f363", | |
| "sweet-potato" => "1f360", | |
| "swimmer" => "1f3ca", | |
| "syringe" => "1f489", | |
| "tada" => "1f389", | |
| "tanabata-tree" => "1f38b", | |
| "tangerine" => "1f34a", | |
| "tea" => "1f375", | |
| "telephone-receiver" => "1f4de", | |
| "telescope" => "1f52d", | |
| "tennis" => "1f3be", | |
| "toilet" => "1f6bd", | |
| "tomato" => "1f345", | |
| "tophat" => "1f3a9", | |
| "triangular-ruler" => "1f4d0", | |
| "trophy" => "1f3c6", | |
| "tropical-drink" => "1f379", | |
| "trumpet" => "1f3ba", | |
| "tv" => "1f4fa", | |
| "unlock" => "1f513", | |
| "vhs" => "1f4fc", | |
| "video-camera" => "1f4f9", | |
| "video-game" => "1f3ae", | |
| "violin" => "1f3bb", | |
| "watch" => "231a", | |
| "watermelon" => "1f349", | |
| "wine-glass" => "1f377", | |
| "womans-clothes" => "1f45a", | |
| "womans-hat" => "1f452", | |
| "wrench" => "1f527", | |
| "yen" => "1f4b4", | |
| "aerial-tramway" => "1f6a1", | |
| "airplane" => "2708", | |
| "ambulance" => "1f691", | |
| "anchor" => "2693", | |
| "articulated-lorry" => "1f69b", | |
| "atm" => "1f3e7", | |
| "bank" => "1f3e6", | |
| "barber" => "1f488", | |
| "beginner" => "1f530", | |
| "bike" => "1f6b2", | |
| "blue-car" => "1f699", | |
| "boat" => "26f5", | |
| "bridge-at-night" => "1f309", | |
| "bullettrain-front" => "1f685", | |
| "bullettrain-side" => "1f684", | |
| "bus" => "1f68c", | |
| "busstop" => "1f68f", | |
| "car" => "1f697", | |
| "carousel-horse" => "1f3a0", | |
| "checkered-flag" => "1f3c1", | |
| "church" => "26ea", | |
| "circus-tent" => "1f3aa", | |
| "city-sunrise" => "1f307", | |
| "city-sunset" => "1f306", | |
| "construction" => "1f6a7", | |
| "convenience-store" => "1f3ea", | |
| "crossed-flags" => "1f38c", | |
| "department-store" => "1f3ec", | |
| "european-castle" => "1f3f0", | |
| "european-post-office" => "1f3e4", | |
| "factory" => "1f3ed", | |
| "ferris-wheel" => "1f3a1", | |
| "fire-engine" => "1f692", | |
| "fountain" => "26f2", | |
| "fuelpump" => "26fd", | |
| "helicopter" => "1f681", | |
| "hospital" => "1f3e5", | |
| "hotel" => "1f3e8", | |
| "hotsprings" => "2668", | |
| "house" => "1f3e0", | |
| "house-with-garden" => "1f3e1", | |
| "japan" => "1f5fe", | |
| "japanese-castle" => "1f3ef", | |
| "light-rail" => "1f688", | |
| "love-hotel" => "1f3e9", | |
| "minibus" => "1f690", | |
| "monorail" => "1f69d", | |
| "mount-fuji" => "1f5fb", | |
| "mountain-cableway" => "1f6a0", | |
| "mountain-railway" => "1f69e", | |
| "moyai" => "1f5ff", | |
| "office" => "1f3e2", | |
| "oncoming-automobile" => "1f698", | |
| "oncoming-bus" => "1f68d", | |
| "oncoming-police-car" => "1f694", | |
| "oncoming-taxi" => "1f696", | |
| "performing-arts" => "1f3ad", | |
| "police-car" => "1f693", | |
| "post-office" => "1f3e3", | |
| "railway-car" => "1f683", | |
| "rainbow" => "1f308", | |
| "rocket" => "1f680", | |
| "roller-coaster" => "1f3a2", | |
| "rotating-light" => "1f6a8", | |
| "round-pushpin" => "1f4cd", | |
| "rowboat" => "1f6a3", | |
| "school" => "1f3eb", | |
| "ship" => "1f6a2", | |
| "slot-machine" => "1f3b0", | |
| "speedboat" => "1f6a4", | |
| "stars" => "1f303", | |
| "station" => "1f689", | |
| "statue-of-liberty" => "1f5fd", | |
| "steam-locomotive" => "1f682", | |
| "sunrise" => "1f305", | |
| "sunrise-over-mountains" => "1f304", | |
| "suspension-railway" => "1f69f", | |
| "taxi" => "1f695", | |
| "tent" => "26fa", | |
| "ticket" => "1f3ab", | |
| "tokyo-tower" => "1f5fc", | |
| "tractor" => "1f69c", | |
| "traffic-light" => "1f6a5", | |
| "train2" => "1f686", | |
| "tram" => "1f68a", | |
| "triangular-flag-on-post" => "1f6a9", | |
| "trolleybus" => "1f68e", | |
| "truck" => "1f69a", | |
| "vertical-traffic-light" => "1f6a6", | |
| "warning" => "26a0", | |
| "wedding" => "1f492", | |
| "jp" => "1f1ef-1f1f5", | |
| "kr" => "1f1f0-1f1f7", | |
| "cn" => "1f1e8-1f1f3", | |
| "us" => "1f1fa-1f1f8", | |
| "fr" => "1f1eb-1f1f7", | |
| "es" => "1f1ea-1f1f8", | |
| "it" => "1f1ee-1f1f9", | |
| "ru" => "1f1f7-1f1fa", | |
| "gb" => "1f1ec-1f1e7", | |
| "de" => "1f1e9-1f1ea", | |
| "100" => "1f4af", | |
| "1234" => "1f522", | |
| "a" => "1f170", | |
| "ab" => "1f18e", | |
| "abc" => "1f524", | |
| "abcd" => "1f521", | |
| "accept" => "1f251", | |
| "aquarius" => "2652", | |
| "aries" => "2648", | |
| "arrow-backward" => "25c0", | |
| "arrow-double-down" => "23ec", | |
| "arrow-double-up" => "23eb", | |
| "arrow-down" => "2b07", | |
| "arrow-down-small" => "1f53d", | |
| "arrow-forward" => "25b6", | |
| "arrow-heading-down" => "2935", | |
| "arrow-heading-up" => "2934", | |
| "arrow-left" => "2b05", | |
| "arrow-lower-left" => "2199", | |
| "arrow-lower-right" => "2198", | |
| "arrow-right" => "27a1", | |
| "arrow-right-hook" => "21aa", | |
| "arrow-up" => "2b06", | |
| "arrow-up-down" => "2195", | |
| "arrow-up-small" => "1f53c", | |
| "arrow-upper-left" => "2196", | |
| "arrow-upper-right" => "2197", | |
| "arrows-clockwise" => "1f503", | |
| "arrows-counterclockwise" => "1f504", | |
| "b" => "1f171", | |
| "baby-symbol" => "1f6bc", | |
| "baggage-claim" => "1f6c4", | |
| "ballot-box-with-check" => "2611", | |
| "bangbang" => "203c", | |
| "black-circle" => "26ab", | |
| "black-square-button" => "1f532", | |
| "cancer" => "264b", | |
| "capital-abcd" => "1f520", | |
| "capricorn" => "2651", | |
| "chart" => "1f4b9", | |
| "children-crossing" => "1f6b8", | |
| "cinema" => "1f3a6", | |
| "cl" => "1f191", | |
| "clock1" => "1f550", | |
| "clock10" => "1f559", | |
| "clock1030" => "1f565", | |
| "clock11" => "1f55a", | |
| "clock1130" => "1f566", | |
| "clock12" => "1f55b", | |
| "clock1230" => "1f567", | |
| "clock130" => "1f55c", | |
| "clock2" => "1f551", | |
| "clock230" => "1f55d", | |
| "clock3" => "1f552", | |
| "clock330" => "1f55e", | |
| "clock4" => "1f553", | |
| "clock430" => "1f55f", | |
| "clock5" => "1f554", | |
| "clock530" => "1f560", | |
| "clock6" => "1f555", | |
| "clock630" => "1f561", | |
| "clock7" => "1f556", | |
| "clock730" => "1f562", | |
| "clock8" => "1f557", | |
| "clock830" => "1f563", | |
| "clock9" => "1f558", | |
| "clock930" => "1f564", | |
| "congratulations" => "3297", | |
| "cool" => "1f192", | |
| "copyright" => "a9", | |
| "curly-loop" => "27b0", | |
| "currency-exchange" => "1f4b1", | |
| "customs" => "1f6c3", | |
| "diamond-shape-with-a-dot-inside" => "1f4a0", | |
| "do-not-litter" => "1f6af", | |
| "eight" => "38-20e3", | |
| "eight-pointed-black-star" => "2734", | |
| "eight-spoked-asterisk" => "2733", | |
| "end" => "1f51a", | |
| "fast-forward" => "23e9", | |
| "five" => "35-20e3", | |
| "four" => "34-20e3", | |
| "free" => "1f193", | |
| "gemini" => "264a", | |
| "hash" => "23-20e3", | |
| "heart-decoration" => "1f49f", | |
| "heavy-check-mark" => "2714", | |
| "heavy-division-sign" => "2797", | |
| "heavy-dollar-sign" => "1f4b2", | |
| "heavy-minus-sign" => "2796", | |
| "heavy-multiplication-x" => "2716", | |
| "heavy-plus-sign" => "2795", | |
| "id" => "1f194", | |
| "ideograph-advantage" => "1f250", | |
| "information-source" => "2139", | |
| "interrobang" => "2049", | |
| "keycap-ten" => "1f51f", | |
| "koko" => "1f201", | |
| "large-blue-circle" => "1f535", | |
| "large-blue-diamond" => "1f537", | |
| "large-orange-diamond" => "1f536", | |
| "left-luggage" => "1f6c5", | |
| "left-right-arrow" => "2194", | |
| "leftwards-arrow-with-hook" => "21a9", | |
| "leo" => "264c", | |
| "libra" => "264e", | |
| "link" => "1f517", | |
| "m" => "24c2", | |
| "mens" => "1f6b9", | |
| "metro" => "1f687", | |
| "mobile-phone-off" => "1f4f4", | |
| "negative-squared-cross-mark" => "274e", | |
| "new" => "1f195", | |
| "ng" => "1f196", | |
| "nine" => "39-20e3", | |
| "no-bicycles" => "1f6b3", | |
| "no-entry" => "26d4", | |
| "no-entry-sign" => "1f6ab", | |
| "no-mobile-phones" => "1f4f5", | |
| "no-pedestrians" => "1f6b7", | |
| "no-smoking" => "1f6ad", | |
| "non-potable-water" => "1f6b1", | |
| "o" => "2b55", | |
| "o2" => "1f17e", | |
| "ok" => "1f197", | |
| "on" => "1f51b", | |
| "one" => "31-20e3", | |
| "ophiuchus" => "26ce", | |
| "parking" => "1f17f", | |
| "part-alternation-mark" => "303d", | |
| "passport-control" => "1f6c2", | |
| "pisces" => "2653", | |
| "potable-water" => "1f6b0", | |
| "put-litter-in-its-place" => "1f6ae", | |
| "radio-button" => "1f518", | |
| "recycle" => "267b", | |
| "red-circle" => "1f534", | |
| "registered" => "ae", | |
| "repeat" => "1f501", | |
| "repeat-one" => "1f502", | |
| "restroom" => "1f6bb", | |
| "rewind" => "23ea", | |
| "sa" => "1f202", | |
| "sagittarius" => "2650", | |
| "scorpius" => "264f", | |
| "secret" => "3299", | |
| "seven" => "37-20e3", | |
| "signal-strength" => "1f4f6", | |
| "six" => "36-20e3", | |
| "six-pointed-star" => "1f52f", | |
| "small-blue-diamond" => "1f539", | |
| "small-orange-diamond" => "1f538", | |
| "small-red-triangle" => "1f53a", | |
| "small-red-triangle-down" => "1f53b", | |
| "soon" => "1f51c", | |
| "sos" => "1f198", | |
| "symbols" => "1f523", | |
| "taurus" => "2649", | |
| "three" => "33-20e3", | |
| "tm" => "2122", | |
| "top" => "1f51d", | |
| "trident" => "1f531", | |
| "twisted-rightwards-arrows" => "1f500", | |
| "two" => "32-20e3", | |
| "u5272" => "1f239", | |
| "u5408" => "1f234", | |
| "u55b6" => "1f23a", | |
| "u6307" => "1f22f", | |
| "u6708" => "1f237", | |
| "u6709" => "1f236", | |
| "u6e80" => "1f235", | |
| "u7121" => "1f21a", | |
| "u7533" => "1f238", | |
| "u7981" => "1f232", | |
| "u7a7a" => "1f233", | |
| "underage" => "1f51e", | |
| "up" => "1f199", | |
| "vibration-mode" => "1f4f3", | |
| "virgo" => "264d", | |
| "vs" => "1f19a", | |
| "wavy-dash" => "3030", | |
| "wc" => "1f6be", | |
| "wheelchair" => "267f", | |
| "white-check-mark" => "2705", | |
| "white-circle" => "26aa", | |
| "white-flower" => "1f4ae", | |
| "white-square-button" => "1f533", | |
| "womens" => "1f6ba", | |
| "x" => "274c", | |
| "zero" => "30-20e3" | |
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Sample code | |
| */ | |
| trait EmojiTrait | |
| { | |
| /** @var array */ | |
| protected $emojiMap = null; | |
| /** | |
| * @marker : | |
| */ | |
| protected function parseEmoji($markdown) | |
| { | |
| if (preg_match('/^:([\w\d-]+):/', $markdown, $matches)) { | |
| return [ | |
| [ | |
| 'emoji', | |
| [['text', $matches[1]]], | |
| ], | |
| strlen($matches[0]) | |
| ]; | |
| } | |
| return [['text', $markdown[0]], 1]; | |
| } | |
| protected function renderEmoji($block) | |
| { | |
| if ($this->emojiMap === null) { | |
| $this->emojiMap = require __DIR__ . '/emoji-map.php'; | |
| } | |
| $name = $this->renderAbsy($block[1]); | |
| if (isset($this->emojiMap[$name])) { | |
| return implode('', array_map(function($codepoint) { | |
| return '&#x' . strtolower($codepoint) . ';'; // This text can be parsed by twemoji.js | |
| }, explode('-', $this->emojiMap[$name]))); | |
| } else { | |
| return ':' . $name . ':'; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment