mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
#3041: fix handling of unicode docstrings.
This commit is contained in:
parent
f4d5c0a380
commit
063d4d88f7
2
CHANGES
2
CHANGES
@ -69,6 +69,8 @@ Bugs fixed
|
||||
* Fix the handling of explicit module names given to autoclass directives.
|
||||
They now show up with the correct module name in the generated docs.
|
||||
|
||||
* Enable autodoc to process Unicode docstrings.
|
||||
|
||||
|
||||
Release 0.3 (May 6, 2008)
|
||||
=========================
|
||||
|
@ -218,7 +218,7 @@ def generate_rst(what, name, members, inherited, undoc, add_content, document,
|
||||
module = getattr(todoc, '__module__', None)
|
||||
if module is not None:
|
||||
charset = get_module_charset(module)
|
||||
docstrings = [docstring.decode(charset) for docstring in docstrings]
|
||||
docstrings = [isinstance(d, str) and d.decode(charset) or d for d in docstrings]
|
||||
|
||||
# add docstring content
|
||||
for docstring in docstrings:
|
||||
|
Loading…
Reference in New Issue
Block a user