diff options
| author | otofune <otofune@gmail.com> | 2017-02-28 20:33:27 +0000 |
|---|---|---|
| committer | otofune <otofune@gmail.com> | 2017-03-01 03:19:24 +0000 |
| commit | 67ea1498ff128e6121e9897aa7093107ccfacab6 (patch) | |
| tree | 66a639bf3a266a68cdd54f67255a270cd7dbc6de /src/web/app/common | |
| parent | Fix type (diff) | |
| download | sharkey-67ea1498ff128e6121e9897aa7093107ccfacab6.tar.gz sharkey-67ea1498ff128e6121e9897aa7093107ccfacab6.tar.bz2 sharkey-67ea1498ff128e6121e9897aa7093107ccfacab6.zip | |
[common] text & [web] common > scripts > text compiler: support emoji
Diffstat (limited to 'src/web/app/common')
| -rw-r--r-- | src/web/app/common/scripts/text-compiler.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/web/app/common/scripts/text-compiler.js b/src/web/app/common/scripts/text-compiler.js index c9eb73e870..a3c1fe8dde 100644 --- a/src/web/app/common/scripts/text-compiler.js +++ b/src/web/app/common/scripts/text-compiler.js @@ -1,5 +1,6 @@ const riot = require('riot'); const nyaize = require('nyaize').default; +const emojinize = require('emojinize'); const CONFIG = require('./config'); const escape = function(text) { @@ -35,6 +36,8 @@ module.exports = function(tokens, shouldBreak, shouldEscape) { return '<pre><code>' + token.html + '</code></pre>'; case 'inline-code': return '<code>' + token.html + '</code>'; + case 'emoji': + return emojinize.encode(token.content) } }).join(''); |