mirror of
https://github.com/django/django.git
synced 2025-07-10 06:45:14 +00:00
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
This commit is contained in:
parent
af244e47cc
commit
c61987d75a
8 changed files with 777 additions and 797 deletions
|
@ -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 @@ class VersionDirective(Directive):
|
|||
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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue