diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-05-05 14:41:18 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-05-08 14:34:56 +0200 |
commit | 4708352e70c557c14fd8bdac5be7f7ba92a37f08 (patch) | |
tree | a1271900d515dbaac0709541b3932ea4ad67a8af /rtemsspec/sphinxcontent.py | |
parent | sphinxcontent: Make get value functions public (diff) | |
download | rtems-central-4708352e70c557c14fd8bdac5be7f7ba92a37f08.tar.bz2 |
sphinxcontent: Add add_rubric()
Diffstat (limited to 'rtemsspec/sphinxcontent.py')
-rw-r--r-- | rtemsspec/sphinxcontent.py | 6 |
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)]) |