Ticket #8696: t8696-r8782.diff

File t8696-r8782.diff, 765 bytes (added by ramiro, 7 years ago)

Patch that stops SmatyPants from messing with parsed-literal blocks

  • docs/_ext/djangodocs.py

    diff -r a044aefea54a docs/_ext/djangodocs.py
    a b  
    108108            node['ids'] = ['s-' + i for i in old_ids]
    109109            sphinx.htmlwriter.SmartyPantsHTMLTranslator.visit_section(self, node)
    110110            node['ids'] = old_ids
     111
     112    def visit_literal_block(self, node):
     113        self.no_smarty += 1
     114        sphinx.htmlwriter.SmartyPantsHTMLTranslator.visit_literal_block(self, node)
     115
     116    def depart_literal_block(self, node):
     117        sphinx.htmlwriter.SmartyPantsHTMLTranslator.depart_literal_block(self, node)
     118        self.no_smarty -= 1
     119
    111120
    112121def parse_django_admin_node(env, sig, signode):
    113122    command = sig.split(' ')[0]
Back to Top