Skip to content

Is it possible to render emojis as well? #107

Discussion options

You must be logged in to vote

Hey, unicode emoji are supported in general, i. e. if you put in ⭐️ instead of :star:, it should work. That double-colon syntax is not converted automatically though by marked (which is the underlying tool to convert the markdown to html)...

It's possible to extend the marked renderer to do that; giving an example here but not claiming that it's robust in this way (feel free to figure out sth better), and I haven't tried running this, so not sure it actually works in this way.

// config.js

const marked = require('marked');
const { emojify } = require('node-emoji');

const renderer = new marked.Renderer();

renderer.text = emojify;

module.exports = {
  // other options...
  marked_options: 

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@the-jan-peter
Comment options

Answer selected by simonhaenisch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants