Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Mar 1, 2025
1 parent fda96cd commit 36c7c60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Features added
Bugs fixed
----------

* #13392: HTML Search: make sure jieba.load_userdict got a string param.
* #13392: Fix argument type for ``jieba.load_userdict()``.

Testing
-------
4 changes: 2 additions & 2 deletions sphinx/search/zh.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ def __init__(self, options: dict[str, str]) -> None:

def init(self, options: dict[str, str]) -> None:
if JIEBA:
dict_path = options.get('dict', JIEBA_DEFAULT_DICT.as_posix())
dict_path = options.get('dict', JIEBA_DEFAULT_DICT)
if dict_path and Path(dict_path).is_file():
jieba.load_userdict(dict_path)
jieba.load_userdict(str(dict_path))

self.stemmer = snowballstemmer.stemmer('english')

Expand Down

0 comments on commit 36c7c60

Please sign in to comment.