Fix #3285: autosummary: asterisks are escaped twice

This commit is contained in:
Takeshi KOMIYA 2017-01-21 15:50:41 +09:00
parent a0c2029b3c
commit bfcb92f6fd
4 changed files with 10 additions and 2 deletions

View File

@ -51,6 +51,7 @@ Bugs fixed
* Inline math in parsed-literal is not rendered well by LaTeX (ref #3340)
* #3308: Parsed-literals don't wrap very long lines with pdf builder (ref #3340)
* #3295: Could not import extension sphinx.builders.linkcheck
* #3285: autosummary: asterisks are escaped twice
Release 1.5.1 (released Dec 13, 2016)

View File

@ -302,7 +302,6 @@ class Autosummary(Directive):
else:
max_chars = max(10, max_item_chars - len(display_name))
sig = mangle_signature(sig, max_chars=max_chars)
sig = sig.replace('*', r'\*')
# -- Grab the summary

View File

@ -71,5 +71,5 @@ class C:
'''
def func(arg_):
def func(arg_, *args, **kwargs):
"""Test function take an argument ended with underscore."""

View File

@ -95,3 +95,11 @@ def test_get_items_summary(app, status, warning):
for key, expected in iteritems(expected_values):
assert autosummary_items[key][2] == expected, 'Summary for %s was %r -'\
' expected %r' % (key, autosummary_items[key], expected)
# check an item in detail
assert 'func' in autosummary_items
func_attrs = ('func',
'(arg_, *args, **kwargs)',
'Test function take an argument ended with underscore.',
'dummy_module.func')
assert autosummary_items['func'] == func_attrs