# HG changeset patch # User cmlenz # Date 1163414422 0 # Node ID 6951db75824e803f1134b6044078945904b9ab66 # Parent 85d8e57a23e5cf21de3c4893cf0075610df8b25c Remove unused code from text template plugin. diff --git a/doc/text-templates.txt b/doc/text-templates.txt --- a/doc/text-templates.txt +++ b/doc/text-templates.txt @@ -116,7 +116,8 @@ Template Directives ------------------- -Directives are lines starting with a ``#`` character followed immediately by the directive name. They can affect how the template is rendered in a number of +Directives are lines starting with a ``#`` character followed immediately by +the directive name. They can affect how the template is rendered in a number of ways: Genshi provides directives for conditionals and looping, among others. Directives must be on separate lines, and the ``#`` character must be be the diff --git a/doc/xml-templates.txt b/doc/xml-templates.txt --- a/doc/xml-templates.txt +++ b/doc/xml-templates.txt @@ -104,7 +104,7 @@ You **will** however get a ``NameError`` if you try to call an undefined variable, or do anything else with it, such as accessing its attributes. If you need to know whether a variable is defined, you can check its type against the -``Undefined`` class, for example in an `py:if`_ directive:: +``Undefined`` class, for example in a `py:if`_ directive:: >>> from genshi.template import TextTemplate >>> tmpl = TextTemplate('${type(doh) is Undefined}') diff --git a/genshi/template/plugin.py b/genshi/template/plugin.py --- a/genshi/template/plugin.py +++ b/genshi/template/plugin.py @@ -152,11 +152,3 @@ template_class = TextTemplate extension = '.txt' default_format = 'text' - - def transform(self, info, template): - """Render the output to an event stream.""" - data = {} - if self.get_extra_vars: - data.update(self.get_extra_vars()) - data.update(info) - return super(TextTemplateEnginePlugin, self).transform(data, template)