From 03bab95a1fd419d4f07e821284d298582f996e0b 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);