summaryrefslogtreecommitdiffstats
path: root/rtemsspec/sphinxcontent.py
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-05-07 13:45:01 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-05-07 13:45:24 +0200
commit12edb026aef7d47c11339a58df9c1784117bbfda (patch)
tree0bd43daee4a5d66d2d61c6f0ecdba06968f7493b /rtemsspec/sphinxcontent.py
parentapplconfig: Use unspecified function (diff)
downloadrtems-central-12edb026aef7d47c11339a58df9c1784117bbfda.tar.bz2
applconfig: Use unspecified groups
Diffstat (limited to 'rtemsspec/sphinxcontent.py')
-rw-r--r--rtemsspec/sphinxcontent.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/rtemsspec/sphinxcontent.py b/rtemsspec/sphinxcontent.py
index 5ebf5287..7b6a257d 100644
--- a/rtemsspec/sphinxcontent.py
+++ b/rtemsspec/sphinxcontent.py
@@ -248,6 +248,15 @@ def _get_value_sphinx_unspecified_function(ctx: ItemGetValueContext) -> Any:
return _get_value_sphinx_ref(ctx, _get_value_sphinx_function, "()")
+def _get_value_sphinx_unspecified_group(ctx: ItemGetValueContext) -> Any:
+ if "c-user" in ctx.item["references"]:
+ return f":ref:`{ctx.item['references']['c-user']}`"
+ if "url" in ctx.item["references"]:
+ url = ctx.item["references"]["url"]
+ return f"`{ctx.value[ctx.key]}{postfix} <{url}>`_"
+ return ctx.value[ctx.key]
+
+
def _get_value_sphinx_unspecified_type(ctx: ItemGetValueContext) -> Any:
return _get_value_sphinx_ref(ctx, _get_value_sphinx_type, "")
@@ -280,6 +289,8 @@ class SphinxMapper(ItemMapper):
_get_value_sphinx_unspecified_define)
self.add_get_value("interface/unspecified-function:/name",
_get_value_sphinx_unspecified_function)
+ self.add_get_value("interface/unspecified-group:/name",
+ _get_value_sphinx_unspecified_group)
self.add_get_value("interface/unspecified-type:/name",
_get_value_sphinx_unspecified_type)