summaryrefslogtreecommitdiff
path: root/src/web/app/common/scripts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-03-01 14:22:56 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-03-01 14:22:56 +0900
commit9c7c7a956c88966b39a395a77f9b2f2d3949ee7b (patch)
tree530a4e87d20e06b99180241374ae15d8d6028220 /src/web/app/common/scripts
parent[Client] Trim text (diff)
downloadsharkey-9c7c7a956c88966b39a395a77f9b2f2d3949ee7b.tar.gz
sharkey-9c7c7a956c88966b39a395a77f9b2f2d3949ee7b.tar.bz2
sharkey-9c7c7a956c88966b39a395a77f9b2f2d3949ee7b.zip
Add nice comment
Diffstat (limited to 'src/web/app/common/scripts')
-rw-r--r--src/web/app/common/scripts/text-compiler.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/web/app/common/scripts/text-compiler.js b/src/web/app/common/scripts/text-compiler.js
index aacd28fb6c..4a2ca400a9 100644
--- a/src/web/app/common/scripts/text-compiler.js
+++ b/src/web/app/common/scripts/text-compiler.js
@@ -37,6 +37,7 @@ module.exports = (tokens, shouldBreak) => {
}
}).join('');
+ // Remove needless whitespaces
text = text
.replace(/ <code>/g, '<code>').replace(/<\/code> /g, '</code>')
.replace(/<br><code><pre>/g, '<code><pre>').replace(/<\/code><\/pre><br>/g, '</code></pre>');