From 0ec01baa3bcfdce7aef5340fbd6b51e94ec3d94f Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 1 Mar 2017 14:22:29 +0900 Subject: [PATCH] [Client] Trim text --- src/web/app/common/scripts/text-compiler.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/web/app/common/scripts/text-compiler.js b/src/web/app/common/scripts/text-compiler.js index 3098d2ff8..aacd28fb6 100644 --- a/src/web/app/common/scripts/text-compiler.js +++ b/src/web/app/common/scripts/text-compiler.js @@ -37,7 +37,9 @@ module.exports = (tokens, shouldBreak) => { } }).join(''); - text = text.replace(/
/g, '
').replace(/<\/code><\/pre>
/g, '
'); + text = text + .replace(/ /g, '').replace(/<\/code> /g, '') + .replace(/
/g, '
').replace(/<\/code><\/pre>
/g, '
'); if (me && me.data && me.data.nya) { text = nyaize(text);