1
0
mirror of synced 2026-05-05 07:35:21 +00:00

Docs: Render cell titles

Also put property lists *after* cell description.
This commit is contained in:
Krystine Sherwin
2024-09-16 14:11:01 +12:00
parent 7216f07691
commit 927dc445dd
3 changed files with 17 additions and 10 deletions

View File

@@ -209,6 +209,14 @@ class CellNode(TocNode):
self.env.docname,
idx,
0))
def transform_content(self, contentnode: addnodes.desc_content) -> None:
# Add the cell title to the body
if 'title' in self.options:
titlenode = nodes.paragraph()
titlenode += nodes.strong()
titlenode[-1] += nodes.Text(self.options['title'])
contentnode.insert(0, titlenode)
class CellSourceNode(TocNode):
"""A custom code block for including cell source."""