diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-03-01 14:22:29 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-03-01 14:22:29 +0900 |
| commit | 03bab95a1fd419d4f07e821284d298582f996e0b (patch) | |
| tree | b3ae7d2fba528c29f74b1c333fb1a6798fc61ced /src/web/app/common/scripts | |
| parent | Use arrow function (diff) | |
| download | misskey-03bab95a1fd419d4f07e821284d298582f996e0b.tar.gz misskey-03bab95a1fd419d4f07e821284d298582f996e0b.tar.bz2 misskey-03bab95a1fd419d4f07e821284d298582f996e0b.zip | |
[Client] Trim text
Diffstat (limited to 'src/web/app/common/scripts')
| -rw-r--r-- | src/web/app/common/scripts/text-compiler.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/web/app/common/scripts/text-compiler.js b/src/web/app/common/scripts/text-compiler.js index 3098d2ff8d..aacd28fb6c 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(/<br><code><pre>/g, '<code><pre>').replace(/<\/code><\/pre><br>/g, '</code></pre>'); + text = text + .replace(/ <code>/g, '<code>').replace(/<\/code> /g, '</code>') + .replace(/<br><code><pre>/g, '<code><pre>').replace(/<\/code><\/pre><br>/g, '</code></pre>'); if (me && me.data && me.data.nya) { text = nyaize(text); |