Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emoji cdn links for markdown-it-emoji don't work #992

Closed
ang-zeyu opened this issue Jan 21, 2020 · 5 comments · Fixed by #1016
Closed

Emoji cdn links for markdown-it-emoji don't work #992

ang-zeyu opened this issue Jan 21, 2020 · 5 comments · Fixed by #1016

Comments

@ang-zeyu
Copy link
Contributor

ang-zeyu commented Jan 21, 2020

What did you do? Please include the actual source code causing the issue.

markdown-it/index.js ( the fixed number defs for markdown-it-emoji )

// fix emoji numbers
const emojiData = require('markdown-it-emoji/lib/data/full.json');
// Extend emoji here
emojiData['zero'] = emojiData['0'] = '<img style="height: 1em;width: 1em;margin: 0 .05em 0 .1em;vertical-align: -0.1em;" src="https://assets-cdn.github.com/images/icons/emoji/unicode/0030-20e3.png">';
emojiData['one'] = emojiData['1'] = '<img style="height: 1em;width: 1em;margin: 0 .05em 0 .1em;vertical-align: -0.1em;" src="https://assets-cdn.github.com/images/icons/emoji/unicode/0031-20e3.png">';
emojiData['two'] = emojiData['2'] = '<img style="height: 1em;width: 1em;margin: 0 .05em 0 .1em;vertical-align: -0.1em;" src="https://assets-cdn.github.com/images/icons/emoji/unicode/0032-20e3.png">';
emojiData['three'] = emojiData['3'] = '<img style="height: 1em;width: 1em;margin: 0 .05em 0 .1em;vertical-align: -0.1em;" src="https://assets-cdn.github.com/images/icons/emoji/unicode/0033-20e3.png">';
emojiData['four'] = emojiData['4'] = '<img style="height: 1em;width: 1em;margin: 0 .05em 0 .1em;vertical-align: -0.1em;" src="https://assets-cdn.github.com/images/icons/emoji/unicode/0034-20e3.png">';
emojiData['five'] = emojiData['5'] = '<img style="height: 1em;width: 1em;margin: 0 .05em 0 .1em;vertical-align: -0.1em;" src="https://assets-cdn.github.com/images/icons/emoji/unicode/0035-20e3.png">';
emojiData['six'] = emojiData['6'] = '<img style="height: 1em;width: 1em;margin: 0 .05em 0 .1em;vertical-align: -0.1em;" src="https://assets-cdn.github.com/images/icons/emoji/unicode/0036-20e3.png">';
emojiData['seven'] = emojiData['7'] = '<img style="height: 1em;width: 1em;margin: 0 .05em 0 .1em;vertical-align: -0.1em;" src="https://assets-cdn.github.com/images/icons/emoji/unicode/0037-20e3.png">';
emojiData['eight'] = emojiData['8'] = '<img style="height: 1em;width: 1em;margin: 0 .05em 0 .1em;vertical-align: -0.1em;" src="https://assets-cdn.github.com/images/icons/emoji/unicode/0038-20e3.png">';
emojiData['nine'] = emojiData['9'] = '<img style="height: 1em;width: 1em;margin: 0 .05em 0 .1em;vertical-align: -0.1em;" src="https://assets-cdn.github.com/images/icons/emoji/unicode/0039-20e3.png">';
markdownIt.use(require('markdown-it-emoji'), {
  defs: emojiData
});

Visit https://assets-cdn.github.com/images/icons/emoji/unicode/0030-20e3.png,
changing 0030 up to 0039 (inclusive), which are the urls used for the 0 - 9 emojis.

What did you expect to happen?
There are quite a few variants of 0 - 9 emojis around, so I'm not so sure which emojis exactly were used before as I never used them before in markbind.

@alyip98
Copy link
Contributor

alyip98 commented Jan 22, 2020

Can you clarify the issue? We aren't using markdown-it-emoji

@ang-zeyu
Copy link
Contributor Author

Can you clarify the issue? We aren't using markdown-it-emoji

Edited with the source code, its the links in the defs for markdown-it-emoji that allows using :1/2/3/...9:

Could have included it in first, my bad!

@alyip98
Copy link
Contributor

alyip98 commented Jan 22, 2020

Well TIL...
Also, the linked worked for me an hour ago (hence the confusion) but now it's down for me too

@ang-zeyu
Copy link
Contributor Author

Well TIL...
Also, the linked worked for me an hour ago (hence the confusion) but now it's down for me too

Posted a working link by accident as well ( not sure if it’s the version that was being used before though ), apologies for the confusion!

@yamgent
Copy link
Member

yamgent commented Jan 23, 2020

Seems like GitHub now uses native emoji for the numbers, these can be the replacement:

0️⃣ 1️⃣ 2️⃣ 3️⃣ 4️⃣ 5️⃣ 6️⃣ 7️⃣ 8️⃣ 9️⃣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants