mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #2148: Error while building devhelp target with non-ASCII document.
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -7,6 +7,7 @@ Bugs fixed
|
||||
* #2012: Fix exception occurred if ``numfig_format`` is invalid
|
||||
* #2142: Provide non-minified JS code in ``sphinx/search/non-minified-js/*.js`` for
|
||||
source distribution on PyPI.
|
||||
* #2148: Error while building devhelp target with non-ASCII document.
|
||||
|
||||
|
||||
Release 1.3.2 (released Nov 29, 2015)
|
||||
|
||||
@@ -91,7 +91,7 @@ class DevhelpBuilder(StandaloneHTMLBuilder):
|
||||
write_toc(subnode, item)
|
||||
elif isinstance(node, nodes.reference):
|
||||
parent.attrib['link'] = node['refuri']
|
||||
parent.attrib['name'] = node.astext().encode('utf-8')
|
||||
parent.attrib['name'] = node.astext()
|
||||
|
||||
def istoctree(node):
|
||||
return isinstance(node, addnodes.compact_paragraph) and \
|
||||
@@ -129,6 +129,6 @@ class DevhelpBuilder(StandaloneHTMLBuilder):
|
||||
# Dump the XML file
|
||||
f = comp_open(path.join(outdir, outname + '.devhelp'), 'w')
|
||||
try:
|
||||
tree.write(f)
|
||||
tree.write(f, 'utf-8')
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
Reference in New Issue
Block a user