From eb8076cfbf25503c35085bb8bfcefa8bee0a5d98 Mon Sep 17 00:00:00 2001 From: otofune Date: Wed, 31 May 2017 16:19:30 +0900 Subject: [web::text-compiler] enable compiling emoji with pictograph module (#510) --- src/web/app/common/scripts/text-compiler.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/web/app') diff --git a/src/web/app/common/scripts/text-compiler.js b/src/web/app/common/scripts/text-compiler.js index 1743a549aa..0a9b8022df 100644 --- a/src/web/app/common/scripts/text-compiler.js +++ b/src/web/app/common/scripts/text-compiler.js @@ -1,5 +1,5 @@ import * as riot from 'riot'; -//const emojinize = require('emojinize'); +const pictograph = require('pictograph'); import CONFIG from './config'; const escape = text => @@ -34,8 +34,7 @@ export default (tokens, shouldBreak) => { case 'inline-code': return `${token.html}`; case 'emoji': - return `${token.content}`; - //return emojinize.encode(token.content) + return pictograph.dic[token.emoji] || token.content; } }).join(''); -- cgit v1.2.3-freya