summaryrefslogtreecommitdiff
path: root/sphinx/writers/html.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2017-02-25 14:47:34 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2017-02-25 14:47:34 +0900
commit4941148c5d35fc15e6c09799c9a460d761981244 (patch)
tree2410fc207d91c654b6cd28a5127130bd68b99f03 /sphinx/writers/html.py
parent3a5cc26be02ceb824138c05979368f3be158303f (diff)
parent341986c03a42f879c9ffe33e6a1ebd305170851d (diff)
downloadsphinx-git-4941148c5d35fc15e6c09799c9a460d761981244.tar.gz
Merge branch 'stable'
Diffstat (limited to 'sphinx/writers/html.py')
-rw-r--r--sphinx/writers/html.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/sphinx/writers/html.py b/sphinx/writers/html.py
index 03d7c86df..7e924fce9 100644
--- a/sphinx/writers/html.py
+++ b/sphinx/writers/html.py
@@ -155,7 +155,7 @@ class HTMLTranslator(BaseTranslator):
def visit_desc_returns(self, node):
# type: (nodes.Node) -> None
- self.body.append(' &rarr; ')
+ self.body.append(' &#x2192; ')
def depart_desc_returns(self, node):
# type: (nodes.Node) -> None
@@ -835,6 +835,11 @@ class HTMLTranslator(BaseTranslator):
self.body.append(self.starttag(node, 'tr', ''))
node.column = 0
+ def visit_entry(self, node):
+ BaseTranslator.visit_entry(self, node)
+ if self.body[-1] == '&nbsp;':
+ self.body[-1] = '&#160;'
+
def visit_field_list(self, node):
# type: (nodes.Node) -> None
self._fieldlist_row_index = 0
@@ -849,6 +854,12 @@ class HTMLTranslator(BaseTranslator):
node['classes'].append('field-odd')
self.body.append(self.starttag(node, 'tr', '', CLASS='field'))
+ def visit_field_name(self, node):
+ context_count = len(self.context)
+ BaseTranslator.visit_field_name(self, node)
+ if context_count != len(self.context):
+ self.context[-1] = self.context[-1].replace('&nbsp;', '&#160;')
+
def visit_math(self, node, math_env=''):
# type: (nodes.Node, unicode) -> None
logger.warning('using "math" markup without a Sphinx math extension '
@@ -946,6 +957,10 @@ class SmartyPantsHTMLTranslator(HTMLTranslator):
self.no_smarty -= 1
HTMLTranslator.depart_option(self, node)
+ def visit_option_group(self, node):
+ HTMLTranslator.visit_option_group(self, node)
+ self.context[-2] = self.context[-2].replace('&nbsp;', '&#160;')
+
def bulk_text_processor(self, text):
# type: (unicode) -> unicode
if self.no_smarty <= 0: