diff --git a/CHANGES b/CHANGES index 7c2b392..a719780 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +Release 1.0.2 (unreleased) +========================== + +* #6229: htmlhelp builder generates invalid .hhc file + Release 1.0.1 (2019-02-15) ========================== diff --git a/sphinxcontrib/htmlhelp/__init__.py b/sphinxcontrib/htmlhelp/__init__.py index 671425e..a257607 100644 --- a/sphinxcontrib/htmlhelp/__init__.py +++ b/sphinxcontrib/htmlhelp/__init__.py @@ -98,8 +98,7 @@ def __init__(self, document: document) -> None: self.depth = 0 def append(self, text: str) -> None: - indent = ' ' * (self.depth - 1) - self.body.append(indent + text) + self.body.append(text) def astext(self) -> str: return '\n'.join(self.body) @@ -122,18 +121,16 @@ def depart_bullet_list(self, node: Element) -> None: self.append('') def visit_list_item(self, node: Element) -> None: - self.append('
  • ') + self.append('
  • ') self.depth += 1 def depart_list_item(self, node: Element) -> None: self.depth -= 1 - self.append('') def visit_reference(self, node: Element) -> None: title = chm_htmlescape(node.astext(), True) - self.append('') - self.append(' ' % title) - self.append(' ' % node['refuri']) + self.append(' ' % title) + self.append(' ' % node['refuri']) self.append('') raise nodes.SkipNode diff --git a/sphinxcontrib/htmlhelp/templates/project.hhc b/sphinxcontrib/htmlhelp/templates/project.hhc index c1096e7..49410e3 100644 --- a/sphinxcontrib/htmlhelp/templates/project.hhc +++ b/sphinxcontrib/htmlhelp/templates/project.hhc @@ -1,31 +1,24 @@ {%- macro sitemap(name, docname) -%} - - + + {%- endmacro -%} - - - - - - - - - - - - + + + + + + + + +