changeset 524:77a9bd2d3dc8

regex search function updated, to get the subitem flag correctly
author Akash Sinha <akash2607@gmail.com>
date Sun, 21 Aug 2011 17:16:05 +0530
parents 200be16e8d55
children 9e4f94558847
files MoinMoin/items/__init__.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/items/__init__.py	Sun Aug 21 01:54:55 2011 +0530
+++ b/MoinMoin/items/__init__.py	Sun Aug 21 17:16:05 2011 +0530
@@ -643,8 +643,8 @@
         all_item_text = "\n".join(item_info[1] for item_info in all_item_index)
         for fullname, relname, contenttype in index:
             hassubitem = False
-            subitem_name_re = u"%s/" % re.escape(relname)
-            regex = re.compile(subitem_name_re, re.UNICODE)
+            subitem_name_re = u"^%s/[^/]+$" % re.escape(relname)
+            regex = re.compile(subitem_name_re, re.UNICODE|re.M)
             if regex.search(all_item_text):
                 hassubitem = True
             detailed_index.append((fullname, relname, contenttype, hassubitem))