From f817c126183dc6def210ade95d4e7a54bd90147e Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 12 Oct 2016 22:14:18 +0200 Subject: [PATCH] fix custom dict --- src/fenrir/core/punctuation.py | 2 +- src/fenrir/core/punctuationManager.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/fenrir/core/punctuation.py b/src/fenrir/core/punctuation.py index 960d92e2..23d3a95f 100644 --- a/src/fenrir/core/punctuation.py +++ b/src/fenrir/core/punctuation.py @@ -49,7 +49,7 @@ punctuation = { '=':'equals', }, 'CUSTOMDICT':{ - 'chrys': 'king chrys' + 'chrys': 'nice chrys' }, 'EMOJDICT':{ ':)':'smiley', diff --git a/src/fenrir/core/punctuationManager.py b/src/fenrir/core/punctuationManager.py index 74465d82..50f92195 100644 --- a/src/fenrir/core/punctuationManager.py +++ b/src/fenrir/core/punctuationManager.py @@ -38,8 +38,9 @@ class punctuationManager(): return resultText def proceedPunctuation(self, text, ignorePunctuation=False): - resultText = self.useCustomDict(text, self.env['punctuation']['CUSTOMDICT']) - resultText = self.useCustomDict(text, self.env['punctuation']['EMOJDICT']) + resultText = text + resultText = self.useCustomDict(resultText, self.env['punctuation']['CUSTOMDICT']) + resultText = self.useCustomDict(resultText, self.env['punctuation']['EMOJDICT']) currPunctLevel = '' if not ignorePunctuation and self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower() in self.env['punctuation']['LEVELDICT']: currPunctLevel = self.env['punctuation']['LEVELDICT'][self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower()]