changeset 880:aaaf6bb7bf96 trunk

Default XInclude-included template class to the class of the including template. Closes #302.
author cmlenz
date Thu, 15 Apr 2010 21:44:28 +0000
parents fe5b8e29fda8
children 28156470fe24
files genshi/template/markup.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/genshi/template/markup.py
+++ b/genshi/template/markup.py
@@ -243,7 +243,7 @@
                         cls = {
                             'xml': MarkupTemplate,
                             'text': NewTextTemplate
-                        }[parse or 'xml']
+                        }.get(parse) or self.__class__
                     except KeyError:
                         raise TemplateSyntaxError('Invalid value for "parse" '
                                                   'attribute of include',
Copyright (C) 2012-2017 Edgewall Software