diff MoinMoin/macro/Include.py @ 1793:2a4caa295346

Eclipse PyDev Check: fixed lots of its errors and warnings
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 23 Feb 2007 13:06:42 +0100
parents 6dd2e29acffe
children 57f12932915f
line wrap: on
line diff
--- a/MoinMoin/macro/Include.py	Fri Feb 23 09:38:23 2007 +0100
+++ b/MoinMoin/macro/Include.py	Fri Feb 23 13:06:42 2007 +0100
@@ -43,8 +43,8 @@
     for title, _ in title_re.findall(body):
         h = title.strip()
         level = 1
-        while h[level:level+1] == '=': level = level+1
-        depth = min(5, level)
+        while h[level:level+1] == '=':
+            level += 1
         title_text = h[level:-level].strip()
         titles.append((title_text, level))
     return titles
@@ -140,7 +140,6 @@
                 result.append(_sysmsg % ('warning', 'Include: ' + _('Nothing found for "%s"!')) % to_re)
 
         if titlesonly:
-            newbody = []
             levelstack = []
             for title, level in extract_titles(body[from_pos:to_pos], title_re):
                 if levelstack: