From f5f7c66a012bcd407fa15022ffb2cdc9b86d2002 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 22 Oct 2009 11:28:23 +0000 Subject: [PATCH] Allow short form with text as argument. --- Doc/tools/sphinxext/pyspecific.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/tools/sphinxext/pyspecific.py b/Doc/tools/sphinxext/pyspecific.py index e639782d5fd..415310d969f 100644 --- a/Doc/tools/sphinxext/pyspecific.py +++ b/Doc/tools/sphinxext/pyspecific.py @@ -60,6 +60,9 @@ class ImplementationDetail(Directive): content = self.content add_text = nodes.strong('CPython implementation detail:', 'CPython implementation detail:') + if self.arguments: + n, m = self.state.inline_text(self.arguments[0], self.lineno) + pnode.append(nodes.paragraph('', '', *(n + m))) self.state.nested_parse(content, self.content_offset, pnode) if pnode.children and isinstance(pnode[0], nodes.paragraph): pnode[0].insert(0, add_text)