summaryrefslogtreecommitdiff
path: root/src/web/app/common/scripts
diff options
context:
space:
mode:
authorotofune <otofune@users.noreply.github.com>2017-05-31 16:19:30 +0900
committerGitHub <noreply@github.com>2017-05-31 16:19:30 +0900
commiteb8076cfbf25503c35085bb8bfcefa8bee0a5d98 (patch)
tree8306368f326084dd63edcdef815e77eb0f61042e /src/web/app/common/scripts
parent:sparkles: (diff)
downloadsharkey-eb8076cfbf25503c35085bb8bfcefa8bee0a5d98.tar.gz
sharkey-eb8076cfbf25503c35085bb8bfcefa8bee0a5d98.tar.bz2
sharkey-eb8076cfbf25503c35085bb8bfcefa8bee0a5d98.zip
[web::text-compiler] enable compiling emoji with pictograph module (#510)
Diffstat (limited to 'src/web/app/common/scripts')
-rw-r--r--src/web/app/common/scripts/text-compiler.js5
1 files changed, 2 insertions, 3 deletions
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 `<code>${token.html}</code>`;
case 'emoji':
- return `<i>${token.content}</i>`;
- //return emojinize.encode(token.content)
+ return pictograph.dic[token.emoji] || token.content;
}
}).join('');