comparison genshi/template/markup.py @ 783:6dc1a751804d

The match filter now only tests `START` events, as `END` events can not be matched and are otherwise processed together with the matched `START` event.
author cmlenz
date Mon, 14 Jul 2008 17:30:23 +0000
parents b4c973fbe6f5
children 1b6968d31089 98a1b03bbc89
comparison
equal deleted inserted replaced
782:f69786111cd3 783:6dc1a751804d
242 tail[:] = [event] 242 tail[:] = [event]
243 break 243 break
244 244
245 for event in stream: 245 for event in stream:
246 246
247 # We (currently) only care about start and end events for matching 247 # We (currently) only care about start events for matching
248 # We might care about namespace events in the future, though 248 # We might care about namespace events in the future, though
249 if not match_templates or (event[0] is not START and 249 if not match_templates or event[0] is not START:
250 event[0] is not END):
251 yield event 250 yield event
252 continue 251 continue
253 252
254 for idx, (test, path, template, hints, namespaces, directives) \ 253 for idx, (test, path, template, hints, namespaces, directives) \
255 in enumerate(match_templates): 254 in enumerate(match_templates):
Copyright (C) 2012-2017 Edgewall Software