comparison markup/template.py @ 38:fec9f4897415

Fix for #2 (incorrect context node in path expressions). Still some paths that produce incorrect results, but the common case seems to work now.
author cmlenz
date Mon, 03 Jul 2006 11:28:13 +0000
parents 224b0b41d1da
children 42bcb91bf025
comparison
equal deleted inserted replaced
37:224b0b41d1da 38:fec9f4897415
415 self.path = Path(value) 415 self.path = Path(value)
416 self.stream = [] 416 self.stream = []
417 417
418 def __call__(self, stream, ctxt): 418 def __call__(self, stream, ctxt):
419 self.stream = list(stream) 419 self.stream = list(stream)
420 ctxt._match_templates.append((self.path.test(), self.path, self.stream)) 420 ctxt._match_templates.append((self.path.test(ignore_context=True),
421 self.path, self.stream))
421 return [] 422 return []
422 423
423 def __repr__(self): 424 def __repr__(self):
424 return '<%s "%s">' % (self.__class__.__name__, self.path.source) 425 return '<%s "%s">' % (self.__class__.__name__, self.path.source)
425 426
Copyright (C) 2012-2017 Edgewall Software