mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #3285: autosummary: asterisks are escaped twice
This commit is contained in:
parent
a0c2029b3c
commit
bfcb92f6fd
1
CHANGES
1
CHANGES
@ -51,6 +51,7 @@ Bugs fixed
|
|||||||
* Inline math in parsed-literal is not rendered well by LaTeX (ref #3340)
|
* 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)
|
* #3308: Parsed-literals don't wrap very long lines with pdf builder (ref #3340)
|
||||||
* #3295: Could not import extension sphinx.builders.linkcheck
|
* #3295: Could not import extension sphinx.builders.linkcheck
|
||||||
|
* #3285: autosummary: asterisks are escaped twice
|
||||||
|
|
||||||
|
|
||||||
Release 1.5.1 (released Dec 13, 2016)
|
Release 1.5.1 (released Dec 13, 2016)
|
||||||
|
@ -302,7 +302,6 @@ class Autosummary(Directive):
|
|||||||
else:
|
else:
|
||||||
max_chars = max(10, max_item_chars - len(display_name))
|
max_chars = max(10, max_item_chars - len(display_name))
|
||||||
sig = mangle_signature(sig, max_chars=max_chars)
|
sig = mangle_signature(sig, max_chars=max_chars)
|
||||||
sig = sig.replace('*', r'\*')
|
|
||||||
|
|
||||||
# -- Grab the summary
|
# -- Grab the summary
|
||||||
|
|
||||||
|
@ -71,5 +71,5 @@ class C:
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
def func(arg_):
|
def func(arg_, *args, **kwargs):
|
||||||
"""Test function take an argument ended with underscore."""
|
"""Test function take an argument ended with underscore."""
|
||||||
|
@ -95,3 +95,11 @@ def test_get_items_summary(app, status, warning):
|
|||||||
for key, expected in iteritems(expected_values):
|
for key, expected in iteritems(expected_values):
|
||||||
assert autosummary_items[key][2] == expected, 'Summary for %s was %r -'\
|
assert autosummary_items[key][2] == expected, 'Summary for %s was %r -'\
|
||||||
' expected %r' % (key, autosummary_items[key], expected)
|
' 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
|
||||||
|
Loading…
Reference in New Issue
Block a user