From ba3e404b7c531b3ea0521ade4d12e384ba22687f Mon Sep 17 00:00:00 2001 From: Takayuki Shimizukawa Date: Sun, 24 Feb 2013 21:29:56 +0900 Subject: [PATCH] Fix uppercase word is not found in search when html_search_language='ja'. Closes #1111 --- CHANGES | 3 +++ sphinx/search/ja.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CHANGES b/CHANGES index 90d47ad8b..25bbc1e26 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ Release 1.2 (in development) ============================ +* #1111: Fix uppercase word is not found in search when + html_search_language='ja'. Thanks to tomo saito. + * The ``'fontpkg'`` item in :confval:`latex_elements` now defaults to ``''`` when the :confval:`language` uses the Cyrillic script. Suggested by Dmitry Shachnev. diff --git a/sphinx/search/ja.py b/sphinx/search/ja.py index c83c52efa..f0deb154e 100644 --- a/sphinx/search/ja.py +++ b/sphinx/search/ja.py @@ -271,3 +271,6 @@ class SearchJapanese(SearchLanguage): def word_filter(self, stemmed_word): return len(stemmed_word) > 1 + + def stem(self, word): + return word.lower()