From 3624581259cecf7ca2d695fbebc27fed2a4d941c Mon Sep 17 00:00:00 2001 From: root Date: Thu, 5 Oct 2017 16:38:20 -0400 Subject: [PATCH] No smartypants diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py index fd93194..aa3afbb 100644 --- a/docs/_ext/djangodocs.py +++ b/docs/_ext/djangodocs.py @@ -12,7 +12,7 @@ from sphinx.builders.html import StandaloneHTMLBuilder from sphinx.util.compat import Directive from sphinx.util.console import bold from sphinx.util.nodes import set_source_info -from sphinx.writers.html import SmartyPantsHTMLTranslator +from sphinx.writers.html import HTMLTranslator # RE for option descriptions without a '--' prefix simple_option_desc_re = re.compile( @@ -227,7 +227,7 @@ class VersionDirective(Directive): return ret -class DjangoHTMLTranslator(SmartyPantsHTMLTranslator): +class DjangoHTMLTranslator(HTMLTranslator): """ Django-specific reST to HTML tweaks. """ @@ -260,10 +260,10 @@ class DjangoHTMLTranslator(SmartyPantsHTMLTranslator): # def visit_literal_block(self, node): self.no_smarty += 1 - SmartyPantsHTMLTranslator.visit_literal_block(self, node) + HTMLTranslator.visit_literal_block(self, node) def depart_literal_block(self, node): - SmartyPantsHTMLTranslator.depart_literal_block(self, node) + HTMLTranslator.depart_literal_block(self, node) self.no_smarty -= 1 # @@ -300,7 +300,7 @@ class DjangoHTMLTranslator(SmartyPantsHTMLTranslator): old_ids = node.get('ids', []) node['ids'] = ['s-' + i for i in old_ids] node['ids'].extend(old_ids) - SmartyPantsHTMLTranslator.visit_section(self, node) + HTMLTranslator.visit_section(self, node) node['ids'] = old_ids