summaryrefslogtreecommitdiff
path: root/src/web/app/common/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/app/common/scripts')
-rw-r--r--src/web/app/common/scripts/text-compiler.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/web/app/common/scripts/text-compiler.js b/src/web/app/common/scripts/text-compiler.js
index f6c531c6ce..8ea2361b87 100644
--- a/src/web/app/common/scripts/text-compiler.js
+++ b/src/web/app/common/scripts/text-compiler.js
@@ -1,4 +1,5 @@
const riot = require('riot');
+const nyaize = require('nyaize').default;
module.exports = function(tokens, shouldBreak, escape) {
if (shouldBreak == null) {
@@ -34,10 +35,7 @@ module.exports = function(tokens, shouldBreak, escape) {
}).join('');
if (me && me.data && me.data.nya) {
- text = text.replace(/な/g, 'にゃ')
- .replace(/ニャ/g, 'にゃ')
- .replace(/にゃでにゃで/g, 'なでなで')
- .replace(/ニャデニャデ/g, 'ナデナデ');
+ text = nyaize(text);
}
return text;