summaryrefslogtreecommitdiffstats
path: root/rtemsqual/sphinxcontent.py
diff options
context:
space:
mode:
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,