Fix #1462: autosummary warns for namedtuple with attribute with trailing underscore

This commit is contained in:
Takeshi KOMIYA
2016-08-30 00:37:30 +09:00
parent 37bb9c2c33
commit 8d96c90fc6
5 changed files with 41 additions and 1 deletions
@@ -69,3 +69,7 @@ class C:
'''
This is a nested inner class docstring
'''
def func(arg_):
"""Test function take an argument ended with underscore."""
+16
View File
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
"""
test_util_rst
~~~~~~~~~~~~~~~
Tests sphinx.util.rst functions.
:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from sphinx.util.rst import escape
def test_escape():
assert escape(':ref:`id`') == '\:ref\:\`id\`'
assert escape('footnote [#]_') == 'footnote \[\#\]\_'