Changeset 1097
- Timestamp:
- Apr 15, 2010, 10:30:09 PM (13 years ago)
- Location:
- trunk/genshi/template
- Files:
-
- 2 edited
-
markup.py (modified) (1 diff)
-
tests/directives.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/genshi/template/markup.py
r1093 r1097 392 392 # event in the matched content, so they can update their 393 393 # internal state accordingly 394 for test in [mt[0] for mt in match_templates ]:394 for test in [mt[0] for mt in match_templates[idx + 1:]]: 395 395 test(tail[0], namespaces, ctxt, updateonly=True) 396 396 -
trunk/genshi/template/tests/directives.py
r1093 r1097 975 975 self.assertEqual(1, len(matches)) 976 976 977 def test_match_multiple_times1(self): 978 # See http://genshi.edgewall.org/ticket/370 979 tmpl = MarkupTemplate("""<html xmlns:py="http://genshi.edgewall.org/"> 980 <py:match path="body[@id='content']/h2" /> 981 <head py:match="head" /> 982 <head py:match="head" /> 983 <head /> 984 <body /> 985 </html>""") 986 self.assertEqual("""<html> 987 <head/> 988 <body/> 989 </html>""", tmpl.generate().render()) 990 991 def test_match_multiple_times2(self): 992 # See http://genshi.edgewall.org/ticket/370 993 tmpl = MarkupTemplate("""<html xmlns:py="http://genshi.edgewall.org/"> 994 <py:match path="body/div[@id='properties']" /> 995 <head py:match="head" /> 996 <head py:match="head" /> 997 <head/> 998 <body> 999 <div id="properties">Foo</div> 1000 </body> 1001 </html>""") 1002 self.assertEqual("""<html> 1003 <head/> 1004 <body> 1005 </body> 1006 </html>""", tmpl.generate().render()) 1007 977 1008 # FIXME 978 1009 #def test_match_after_step(self):
Note: See TracChangeset
for help on using the changeset viewer.
