Skip to content

Emojis (like this: :emoji_name:) don't display properly in gh repo view #1771

Closed

Description

@masterneko

repo: https://github.com/caelwithcats/test

$ gh repo view
caelwithcats/test
Don't worry about this repo

  :+1:                                                                        
                                                                              
  :smile:                                                                     

View this repository on GitHub: https://github.com/caelwithcats/test

The emojis show as the original markdown but if you add a unicode emoji the emoji's will show:

😃

OS: Linux mint 20
GH version 1.0.0 (2020-09-16)

Activity

  1. added
    bug
    on Sep 18, 2020
  2. vilmibm commented on Sep 18, 2020

    @vilmibm
    Contributor

    Thanks for the report!

    To render these we'd have to maintain a local mapping of :+1: version to the unicode version. I don't think I'm opposed to incorporating that; there might be an off the shelf library we could leverage.

  3. added
    help wanted
    on Sep 18, 2020
  4. masterneko commented on Sep 18, 2020

    @masterneko
    Author

    I think GitHub uses EmojiLib. Why not use the that? - emojis.json is the file that contains the emojis and their metadata

  5. mislav commented on Sep 18, 2020

    @mislav
    Contributor

    GitHub uses gemoji: https://github.com/github/gemoji/blob/master/db/emoji.json

    We could generate a mapping file in Go using the JSON data as input. 👍

  6. jpm63 commented on Sep 18, 2020

    @jpm63

    This feels like a fairly straightforward fix; I'd be happy to take a crack at it.

    As far as the generation of the mapping file goes, go generate feels like the natural choice, but that would likely require changes to the Makefile with a step prior to go build to ensure the local emoji DB is rebuilt each time the CLI is compiled. Would you prefer I go down that path, or if the emoji DB is largely static, I can just write the generation code and we'd have to rebuild the mapping file in an ad hoc manner in the future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bughelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions