Permalink
Browse files

restructuredtext filter now passes settings from {{{RESTRUCTUREDTEXT_…

…FILTER_SETTINGS}}} into docutils. See http://docutils.sourceforge.net/docs/user/config.html#html4css1-writer for what these settings are.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3245 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
jacobian committed Jun 30, 2006
1 parent 2673aa3 commit 0ad8863692ca2eb6071fa53bc3db8fcc5513e009
Showing with 2 additions and 1 deletion.
  1. +2 −1 django/contrib/markup/templatetags/markup.py
@@ -47,7 +47,8 @@ def restructuredtext(value):
raise template.TemplateSyntaxError, "Error in {% restructuredtext %} filter: The Python docutils library isn't installed."
return value
else:
- parts = publish_parts(source=value, writer_name="html4css1")
+ docutils_settings = getattr(settings, "RESTRUCTUREDTEXT_FILTER_SETTINGS", {})
+ parts = publish_parts(source=value, writer_name="html4css1", settings_overrides=docutils_settings)
return parts["fragment"]
register.filter(textile)

0 comments on commit 0ad8863

Please sign in to comment.