mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch 'stable'
This commit is contained in:
commit
d4271c0dce
1
CHANGES
1
CHANGES
@ -64,6 +64,7 @@ Features added
|
||||
* #3241: emit latex warning if buggy titlesec (ref #3210)
|
||||
* #3194: Refer the $MAKE environment variable to determine ``make`` command
|
||||
* Emit warning for nested numbered toctrees (refs: #3142)
|
||||
* #978: `intersphinx_mapping` also allows a list as a parameter
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
|
@ -270,7 +270,7 @@ def load_mappings(app):
|
||||
uri = None # type: unicode
|
||||
inv = None # type: Union[unicode, Tuple[unicode, ...]]
|
||||
|
||||
if isinstance(value, tuple):
|
||||
if isinstance(value, (list, tuple)):
|
||||
# new format
|
||||
name, (uri, inv) = key, value
|
||||
if not isinstance(name, string_types):
|
||||
|
@ -41,7 +41,9 @@ def copy_asset_file(source, destination, context=None, renderer=None):
|
||||
renderer = SphinxRenderer()
|
||||
|
||||
with codecs.open(source, 'r', encoding='utf-8') as fsrc:
|
||||
with codecs.open(destination[:-2], 'w', encoding='utf-8') as fdst:
|
||||
if destination.lower().endswith('_t'):
|
||||
destination = destination[:-2]
|
||||
with codecs.open(destination, 'w', encoding='utf-8') as fdst:
|
||||
fdst.write(renderer.render_string(fsrc.read(), context))
|
||||
else:
|
||||
copyfile(source, destination)
|
||||
|
Loading…
Reference in New Issue
Block a user