diff options
| author | shimizukawa <shimizukawa@gmail.com> | 2012-12-17 04:24:24 +0000 |
|---|---|---|
| committer | shimizukawa <shimizukawa@gmail.com> | 2012-12-17 04:24:24 +0000 |
| commit | f9dced4bfb96284ec4e096fdd2e4c165f3da5086 (patch) | |
| tree | 698c943af25f06631d067af470cd09e1873ce326 /sphinx | |
| parent | e114686b3b34cbad5d981361e02f4ac33b501d27 (diff) | |
| download | sphinx-f9dced4bfb96284ec4e096fdd2e4c165f3da5086.tar.gz | |
fix test failure: python3 + whoosh
Diffstat (limited to 'sphinx')
| -rw-r--r-- | sphinx/websupport/search/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/websupport/search/__init__.py b/sphinx/websupport/search/__init__.py index 385c3fa9..10e3532d 100644 --- a/sphinx/websupport/search/__init__.py +++ b/sphinx/websupport/search/__init__.py @@ -102,7 +102,7 @@ class BaseSearch(object): res = self.context_re.search(text) if res is None: return '' - context_start = max(res.start() - length/2, 0) + context_start = max(res.start() - int(length/2), 0) context_end = context_start + length context = ''.join([context_start > 0 and '...' or '', text[context_start:context_end], |
