From 0ad8863692ca2eb6071fa53bc3db8fcc5513e009 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Fri, 30 Jun 2006 20:19:05 +0000 Subject: [PATCH] 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 --- django/contrib/markup/templatetags/markup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/contrib/markup/templatetags/markup.py b/django/contrib/markup/templatetags/markup.py index 9cbf1b3807..4bb135cc32 100644 --- a/django/contrib/markup/templatetags/markup.py +++ b/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)