diff options
| author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-02-25 14:47:34 +0900 |
|---|---|---|
| committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-02-25 14:47:34 +0900 |
| commit | 4941148c5d35fc15e6c09799c9a460d761981244 (patch) | |
| tree | 2410fc207d91c654b6cd28a5127130bd68b99f03 /sphinx/writers/html.py | |
| parent | 3a5cc26be02ceb824138c05979368f3be158303f (diff) | |
| parent | 341986c03a42f879c9ffe33e6a1ebd305170851d (diff) | |
| download | sphinx-git-4941148c5d35fc15e6c09799c9a460d761981244.tar.gz | |
Merge branch 'stable'
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: |
