changeset 3813:a3cf0aa7bf97

category search: ignore traling whitespace after ----
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 30 Jun 2008 19:44:55 +0000
parents 6f3dbd8430db
children 26240254340b
files MoinMoin/search/Xapian.py MoinMoin/search/queryparser.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/Xapian.py	Mon Jun 30 16:07:16 2008 +0200
+++ b/MoinMoin/search/Xapian.py	Mon Jun 30 19:44:55 2008 +0000
@@ -414,7 +414,7 @@
         while next:
             if next != 1:
                 pos += next.end()
-            prev, next = next, re.search(r'----*\r?\n', body[pos:])
+            prev, next = next, re.search(r'-----*\s*\r?\n', body[pos:])
 
         if not prev or prev == 1:
             return []
--- a/MoinMoin/search/queryparser.py	Mon Jun 30 16:07:16 2008 +0200
+++ b/MoinMoin/search/queryparser.py	Mon Jun 30 19:44:55 2008 +0000
@@ -730,7 +730,7 @@
         """
         kwargs['use_re'] = True
         TextSearch._build_re(self,
-                r'(?m)(^-----*\r?\n)(^##.*\r?\n)*^(?!##)(.*)\b%s\b' % pattern, **kwargs)
+                r'(?m)(^-----*\s*\r?\n)(^##.*\r?\n)*^(?!##)(.*)\b%s\b' % pattern, **kwargs)
 
     def costs(self):
         return 5000 # cheaper than a TextSearch