summaryrefslogtreecommitdiffstats
path: root/rtemsspec/sphinxcontent.py
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2023-05-05 14:41:18 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2023-05-08 14:34:56 +0200
commit4708352e70c557c14fd8bdac5be7f7ba92a37f08 (patch)
treea1271900d515dbaac0709541b3932ea4ad67a8af /rtemsspec/sphinxcontent.py
parentsphinxcontent: Make get value functions public (diff)
downloadrtems-central-4708352e70c557c14fd8bdac5be7f7ba92a37f08.tar.bz2
sphinxcontent: Add add_rubric()
Diffstat (limited to 'rtemsspec/sphinxcontent.py')
-rw-r--r--rtemsspec/sphinxcontent.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/rtemsspec/sphinxcontent.py b/rtemsspec/sphinxcontent.py
index f48dfc67..dd2fb308 100644
--- a/rtemsspec/sphinxcontent.py
+++ b/rtemsspec/sphinxcontent.py
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-2-Clause
""" This module provides classes for Sphinx content generation. """
-# Copyright (C) 2019, 2020 embedded brains GmbH (http://www.embedded-brains.de)
+# Copyright (C) 2019, 2022 embedded brains GmbH (http://www.embedded-brains.de)
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -101,6 +101,10 @@ class SphinxContent(Content):
self.add_header(name, level)
return label
+ def add_rubric(self, name: str) -> None:
+ """ Adds a rubric. """
+ self.add(f".. rubric:: {name}")
+
def add_index_entries(self, entries) -> None:
""" Adds a list of index entries the content. """
self.add([".. index:: " + entry for entry in make_lines(entries)])