X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/281a6f613c78ffd1fa81951db829a5551fd2e42d..46a90d7cfe54bb6df2f99175abd0ad7d26b3da72:/apps/search/custom.py?ds=sidebyside diff --git a/apps/search/custom.py b/apps/search/custom.py index 6cb18fd24..6c16f228f 100644 --- a/apps/search/custom.py +++ b/apps/search/custom.py @@ -119,8 +119,8 @@ class CustomSolrInterface(sunburnt.SolrInterface): if matches: return self.substring(kwargs['text'], matches, - margins=kwargs.get('margins', 30), - mark=kwargs.get('mark', ("", ""))) + margins=kwargs.get('margins', 30), + mark=kwargs.get('mark', ("", ""))) else: return None @@ -151,5 +151,6 @@ class CustomSolrInterface(sunburnt.SolrInterface): snip = snip[:e + off] + mark[1] + snip[e + off:] snip = snip[:s + off] + mark[0] + snip[s + off:] # maybe break on word boundaries + return snip