Permalink
Browse files

Removed use of non-standard indentation rules in docs, and the custom…

… transform that supported them.

Doc writers should be aware that we are now back to normal ReST rules
regarding blockquotes.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16955 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent af244e4 commit c61987d75ad9bc5233257f46a8246bb9d63bbbe1 @spookylukey spookylukey committed Oct 10, 2011
@@ -62,7 +62,6 @@ def setup(app):
app.add_config_value('django_next_version', '0.0', True)
app.add_directive('versionadded', VersionDirective)
app.add_directive('versionchanged', VersionDirective)
- app.add_transform(SuppressBlockquotes)
app.add_builder(DjangoStandaloneHTMLBuilder)
@@ -99,27 +98,6 @@ def run(self):
return ret
-class SuppressBlockquotes(transforms.Transform):
- """
- Remove the default blockquotes that encase indented list, tables, etc.
- """
- default_priority = 300
-
- suppress_blockquote_child_nodes = (
- nodes.bullet_list,
- nodes.enumerated_list,
- nodes.definition_list,
- nodes.literal_block,
- nodes.doctest_block,
- nodes.line_block,
- nodes.table
- )
-
- def apply(self):
- for node in self.document.traverse(nodes.block_quote):
- if len(node.children) == 1 and isinstance(node.children[0], self.suppress_blockquote_child_nodes):
- node.replace_self(node.children[0])
-
class DjangoHTMLTranslator(SmartyPantsHTMLTranslator):
"""
Django-specific reST to HTML tweaks.
Oops, something went wrong. Retry.

0 comments on commit c61987d

Please sign in to comment.