Allow short form with text as argument.

This commit is contained in:
Georg Brandl 2009-10-22 11:28:23 +00:00
parent d032912ac1
commit f5f7c66a01
1 changed files with 3 additions and 0 deletions

View File

@ -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)