diff options
Diffstat (limited to 'src/libmime/lang_detection.c')
-rw-r--r-- | src/libmime/lang_detection.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/libmime/lang_detection.c b/src/libmime/lang_detection.c index 9936bedfa..ba638982d 100644 --- a/src/libmime/lang_detection.c +++ b/src/libmime/lang_detection.c @@ -477,17 +477,15 @@ rspamd_language_detector_read_file (struct rspamd_config *cfg, gsize wlen; const char *word = ucl_object_tolstring (w, &wlen); const char *saved; + guint mp_flags = RSPAMD_MULTIPATTERN_ICASE|RSPAMD_MULTIPATTERN_UTF8; + + if (rspamd_multipattern_has_hyperscan ()) { + mp_flags |= RSPAMD_MULTIPATTERN_RE; + } -#ifdef WITH_HYPERSCAN - rspamd_multipattern_add_pattern_len (d->stop_words[cat].mp, - word, wlen, - RSPAMD_MULTIPATTERN_ICASE|RSPAMD_MULTIPATTERN_UTF8 - |RSPAMD_MULTIPATTERN_RE); -#else rspamd_multipattern_add_pattern_len (d->stop_words[cat].mp, word, wlen, - RSPAMD_MULTIPATTERN_ICASE|RSPAMD_MULTIPATTERN_UTF8); -#endif + mp_flags); nelt->stop_words ++; nstop ++; |