changeset 3395:d5ad5578b2a5

fix category search
author Johannes Berg <johannes AT sipsolutions DOT net>
date Fri, 21 Mar 2008 20:01:16 +0100
parents 396d3434ab92
children b30370fa2f41
files MoinMoin/search/queryparser.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/queryparser.py	Fri Mar 21 18:25:03 2008 +0100
+++ b/MoinMoin/search/queryparser.py	Fri Mar 21 20:01:16 2008 +0100
@@ -734,7 +734,7 @@
     def _build_re(self, pattern, **kwargs):
         kwargs['use_re'] = True
         TextSearch._build_re(self,
-                r'(----(-*)(\r)?\n)(.*)Category%s\b' % pattern, **kwargs)
+                r'(----(-*)(\r)?\n)(.*)%s\b' % pattern, **kwargs)
 
     def costs(self):
         return 5000 # cheaper than a TextSearch
@@ -744,7 +744,7 @@
         return u'%s!"%s"' % (neg, unicode(self._pattern))
 
     def highlight_re(self):
-        return u'(Category%s)' % self._pattern
+        return u'(%s)' % self._pattern
 
     def xapian_wanted(self):
         return True # only easy regexps possible