diff mbox series

[1/4] doc: fix extracted autodoc when short description ends with a ?

Message ID 20201114102356.61234-2-luc.vanoostenryck@gmail.com (mailing list archive)
State Mainlined, archived
Headers show
Series doc: one patch and three improvements | expand

Commit Message

Luc Van Oostenryck Nov. 14, 2020, 10:23 a.m. UTC
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 Documentation/sphinx/cdoc.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/Documentation/sphinx/cdoc.py b/Documentation/sphinx/cdoc.py
index 73c128cb7b35..cca5ad2822de 100755
--- a/Documentation/sphinx/cdoc.py
+++ b/Documentation/sphinx/cdoc.py
@@ -228,8 +228,9 @@  def convert_to_rst(info):
 		if 'short' in info:
 			(n, l) = info['short']
 			l = l[0].capitalize() + l[1:].strip('.')
-			l = '\t' + l + '.'
-			lst.append((n, l + '\n'))
+			if l[-1] != '?':
+				l = l + '.'
+			lst.append((n, '\t' + l + '\n'))
 		if 'tags' in info:
 			for (n, name, l) in info.get('tags', []):
 				if name != 'return':