diff --git a/src/web/app/common/scripts/text-compiler.js b/src/web/app/common/scripts/text-compiler.js index 3ff617484..3098d2ff8 100644 --- a/src/web/app/common/scripts/text-compiler.js +++ b/src/web/app/common/scripts/text-compiler.js @@ -3,20 +3,19 @@ const nyaize = require('nyaize').default; const emojinize = require('emojinize'); const CONFIG = require('./config'); -const escape = function(text) { - return text +const escape = text => + text .replace(/>/g, '>') .replace(/ { if (shouldBreak == null) { shouldBreak = true; } const me = riot.mixin('i').me; - let text = tokens.map(function(token) { + let text = tokens.map(token => { switch (token.type) { case 'text': return escape(token.content) @@ -45,4 +44,4 @@ module.exports = function(tokens, shouldBreak) { } return text; -} +};