diff options
Diffstat (limited to 'sphinx/writers/html.py')
-rw-r--r-- | sphinx/writers/html.py | 17 |
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(' → ') + self.body.append(' → ') 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] == ' ': + self.body[-1] = ' ' + 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(' ', ' ') + 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(' ', ' ') + def bulk_text_processor(self, text): # type: (unicode) -> unicode if self.no_smarty <= 0: |