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
This commit is contained in:
parent
2673aa366a
commit
0ad8863692
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue