diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-07-06 14:30:41 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-07-07 12:58:52 +0200 |
commit | 374e1bf214e0f9691b06fcec30a7d88407ccba0a (patch) | |
tree | a6dd804d13a80d769383ba5124a417a15ee8a239 /rtemsqual/sphinxcontent.py | |
parent | applconfig: Add _ContentAdaptor class (diff) | |
download | rtems-central-374e1bf214e0f9691b06fcec30a7d88407ccba0a.tar.bz2 |
applconfig: Use item mapper for substitution
Diffstat (limited to 'rtemsqual/sphinxcontent.py')
-rw-r--r-- | rtemsqual/sphinxcontent.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/rtemsqual/sphinxcontent.py b/rtemsqual/sphinxcontent.py index 97639c78..c0abdd55 100644 --- a/rtemsqual/sphinxcontent.py +++ b/rtemsqual/sphinxcontent.py @@ -220,9 +220,21 @@ def _get_ref_term_plural(ctx: ItemGetValueContext) -> Any: return f":term:`{ctx.value['term']}s <{ctx.value['term']}>`" +def _get_appl_config_option(ctx: ItemGetValueContext) -> Any: + return f":ref:`{ctx.value[ctx.key]}`" + + class SphinxMapper(ItemMapper): """ Sphinx item mapper. """ def __init__(self, item: Item): super().__init__(item) self.add_get_value("glossary/term:/term", _get_ref_term) self.add_get_value("glossary/term:/plural", _get_ref_term_plural) + self.add_get_value("interface/appl-config-option/feature-enable:/name", + _get_appl_config_option) + self.add_get_value("interface/appl-config-option/feature:/name", + _get_appl_config_option) + self.add_get_value("interface/appl-config-option/initializer:/name", + _get_appl_config_option) + self.add_get_value("interface/appl-config-option/integer:/name", + _get_appl_config_option) |