diff markup/template.py @ 116:c77c113846d6 trunk

Merged [135:138/branches/experimental/cspeedups].
author cmlenz
date Tue, 01 Aug 2006 17:06:03 +0000
parents 2368c3becc52
children c9f0a26e28a2
line wrap: on
line diff
--- a/markup/template.py
+++ b/markup/template.py
@@ -936,9 +936,8 @@
 
             for idx, (test, path, template, directives) in \
                     enumerate(match_templates):
-                result = test(kind, data, pos)
 
-                if result:
+                if test(kind, data, pos) is True:
                     # Consume and store all events until an end event
                     # corresponding to this start event is encountered
                     content = [(kind, data, pos)]
@@ -961,8 +960,8 @@
                                              ctxt, match_templates[:idx] +
                                              match_templates[idx + 1:]):
                         yield event
+
                     ctxt.pop()
-
                     break
 
             else: # no matches
Copyright (C) 2012-2017 Edgewall Software