mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fixed error caused by mixing of string types
This commit is contained in:
parent
24a1512293
commit
579528e0b3
@ -130,8 +130,16 @@ class QtHelpBuilder(StandaloneHTMLBuilder):
|
||||
for indexname, indexcls, content, collapse in self.domain_indices:
|
||||
item = section_template % {'title': indexcls.localname,
|
||||
'ref': '%s.html' % indexname}
|
||||
sections.append(' '*4*4 + item)
|
||||
sections = '\n'.join(sections)
|
||||
sections.append((' ' * 4 * 4 + item).encode('utf-8'))
|
||||
# sections may be unicode strings or byte strings, we have to make sure
|
||||
# they are all byte strings before joining them
|
||||
new_sections = []
|
||||
for section in sections:
|
||||
if isinstance(section, unicode):
|
||||
new_sections.append(section.encode('utf-8'))
|
||||
else:
|
||||
new_sections.append(section)
|
||||
sections = u'\n'.encode('utf-8').join(new_sections)
|
||||
|
||||
# keywords
|
||||
keywords = []
|
||||
|
Loading…
Reference in New Issue
Block a user