changeset 880:3b16d762445b

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 27d210790d27
children fc1e28cb0bee
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