Add say/who to the Lunr exception list. Add setting to extend the list from gamedir.
This commit is contained in:
parent
a58b667bb0
commit
2c3b82ac4a
3 changed files with 12 additions and 1 deletions
|
|
@ -5,13 +5,17 @@ sub-categories.
|
|||
This is used primarily by the default `help` command.
|
||||
|
||||
"""
|
||||
from django.conf import settings
|
||||
import re
|
||||
|
||||
# these are words that Lunr normally ignores but which we want to find
|
||||
# since we use them (e.g. as command names).
|
||||
# Lunr's default ignore-word list is found here:
|
||||
# https://github.com/yeraydiazdiaz/lunr.py/blob/master/lunr/stop_word_filter.py
|
||||
_LUNR_STOP_WORD_FILTER_EXCEPTIONS = ("about", "might", "get")
|
||||
_LUNR_STOP_WORD_FILTER_EXCEPTIONS = (
|
||||
["about", "might", "get", "who", "say"] + settings.LUNR_STOP_WORD_FILTER_EXCEPTIONS
|
||||
)
|
||||
|
||||
|
||||
_LUNR = None
|
||||
_LUNR_EXCEPTION = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue