Mercurial > genshi > mirror
changeset 495:6aec164f8bf3 stable-0.4.x
Ported [594:596] to 0.4.x branch.
author | cmlenz |
---|---|
date | Wed, 30 May 2007 09:35:33 +0000 |
parents | 83b9863f8b9d |
children | 26cf27d4f2b3 |
files | ChangeLog MANIFEST.in genshi/filters/i18n.py genshi/output.py genshi/template/base.py setup.py |
diffstat | 6 files changed, 19 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Version 0.4.2 +http://svn.edgewall.org/repos/genshi/tags/0.4.2/ +(?, from branches/stable/0.4.x) + + * The `doctype` parameter of the markup serializers now also accepts the "name" + of the doctype as string, in addition to the `(name, pubid, sysid)` tuple. + * The I18n filter was not replacing the original attributes with the + translation, but instead adding a second attribute with the same name. + + Version 0.4.1 http://svn.edgewall.org/repos/genshi/tags/0.4.1/ (May 21 2007, from branches/stable/0.4.x)
--- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,4 @@ exclude doc/2000ft.graffle -exclude doc/docutils.conf recursive-exclude doc/logo.lineform * -exclude doc/Makefile include doc/api/*.* include doc/*.html
--- a/genshi/filters/i18n.py +++ b/genshi/filters/i18n.py @@ -129,7 +129,7 @@ yield kind, data, pos continue - new_attrs = list(attrs) + new_attrs = [] changed = False for name, value in attrs: newval = value
--- a/genshi/output.py +++ b/genshi/output.py @@ -150,12 +150,16 @@ :param doctype: a ``(name, pubid, sysid)`` tuple that represents the DOCTYPE declaration that should be included at the top - of the generated output + of the generated output, or the name of a DOCTYPE as + defined in `DocType.get` :param strip_whitespace: whether extraneous whitespace should be stripped from the output + :note: Changed in 0.4.2: The `doctype` parameter can now be a string. """ self.preamble = [] if doctype: + if isinstance(doctype, basestring): + doctype = DocType.get(doctype) self.preamble.append((DOCTYPE, doctype, (None, -1, -1))) self.filters = [EmptyTagFilter()] if strip_whitespace:
--- a/genshi/template/base.py +++ b/genshi/template/base.py @@ -297,7 +297,8 @@ template was found :param filename: the name of the template file, relative to the given base directory - :param loader: the `TemplateLoader` to use for load included templates + :param loader: the `TemplateLoader` to use for loading included + templates :param encoding: the encoding of the `source` :param lookup: the variable lookup mechanism; either "lenient" (the default), "strict", or a custom lookup class