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

Not all emojis are parsed #60

Closed
hilja opened this issue Dec 21, 2017 · 2 comments
Closed

Not all emojis are parsed #60

hilja opened this issue Dec 21, 2017 · 2 comments

Comments

@hilja
Copy link

hilja commented Dec 21, 2017

When stringifying I see emoji codepoints and not the characters, but weirdly some emojis work.

I made this runkit where the behaviour can be tested https://runkit.com/embed/d0vr3nxedg9u.

const grayMatter = require("gray-matter")
const emojis = [ '😂', '😒', '😔', '✌️', '😭', '👌', '😑', '😞', '😏', '😢' ]
grayMatter.stringify('Foo', { emojis })

Results in:

---
emojis:
  - "\uD83D\uDE02"
  - "\uD83D\uDE12"
  - "\uD83D\uDE14"
  - ✌️
  - "\uD83D\uDE2D"
  - "\uD83D\uDC4C"
  - "\uD83D\uDE11"
  - "\uD83D\uDE1E"
  - "\uD83D\uDE0F"
  - "\uD83D\uDE22"
---
Foo
@jonschlinkert
Copy link
Owner

Does this belong here? Seems like a bug with the yaml processor.

@hilja
Copy link
Author

hilja commented Dec 22, 2017

Okay, I had an old gray-matter version, it's fixed nodeca/js-yaml#369. But they still use the unicode sequence \U0001F600 rather than the actual emoji, not human readable. But anyway, it works like this.

@hilja hilja closed this as completed Dec 22, 2017
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

No branches or pull requests

2 participants