diff options
| author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-01-12 13:03:53 +0900 |
|---|---|---|
| committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-01-12 13:03:53 +0900 |
| commit | 38d6c34f35c60689f22d1f71ce650ca1e3005ec4 (patch) | |
| tree | 0677416d0de03a53ee7d348289d8560e511c2bed /sphinx/websupport | |
| parent | ef912eb9a3e923e80d5c6a08fda4597a65d591aa (diff) | |
| parent | 478306e052d9711170b1fbe63635edef02853484 (diff) | |
| download | sphinx-git-38d6c34f35c60689f22d1f71ce650ca1e3005ec4.tar.gz | |
Merge branch 'stable'
Diffstat (limited to 'sphinx/websupport')
| -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 80b5a3535..48279f0a8 100644 --- a/sphinx/websupport/search/__init__.py +++ b/sphinx/websupport/search/__init__.py @@ -106,7 +106,7 @@ class BaseSearch(object): res = self.context_re.search(text) if res is None: return '' - context_start = max(res.start() - int(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], |
