summaryrefslogtreecommitdiffstats
path: root/rtemsqual/sphinxcontent.py
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-06-16 15:51:58 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-07-03 10:22:45 +0200
commitf3490d2461aa665e5b16f234a4b21f1bbd6d0c2d (patch)
treefdf5e67f6bee4a8f10c1a9cb735bf965074805b4 /rtemsqual/sphinxcontent.py
parentDoxyfile: Document static functions (diff)
downloadrtems-central-f3490d2461aa665e5b16f234a4b21f1bbd6d0c2d.tar.bz2
sphinxcontent: Add SphinxContent.definition_item()
Diffstat (limited to 'rtemsqual/sphinxcontent.py')
-rw-r--r--rtemsqual/sphinxcontent.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/rtemsqual/sphinxcontent.py b/rtemsqual/sphinxcontent.py
index 55f5beed..3bec4e04 100644
--- a/rtemsqual/sphinxcontent.py
+++ b/rtemsqual/sphinxcontent.py
@@ -103,6 +103,14 @@ class SphinxContent(Content):
self.add(lines, _definition_item_context)
+ @contextmanager
+ def definition_item(self, name: GenericContent) -> Iterator[None]:
+ """ Opens a definition item context. """
+ self.wrap(name)
+ self.push_indent()
+ yield
+ self.pop_indent()
+
def open_directive(self,
name: str,
value: Optional[str] = None,