From 2a00eeb8d37052555ae5eb0fa10afc8a343f6f24 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 22 Jan 2021 14:34:10 +0100 Subject: content: Move list support to Content() --- rtemsspec/sphinxcontent.py | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'rtemsspec/sphinxcontent.py') diff --git a/rtemsspec/sphinxcontent.py b/rtemsspec/sphinxcontent.py index 5f5493fc..e7881cf3 100644 --- a/rtemsspec/sphinxcontent.py +++ b/rtemsspec/sphinxcontent.py @@ -153,43 +153,6 @@ class SphinxContent(Content): yield self.open_section(name, label_prefix) self.close_section() - def add_list_item(self, content: GenericContent) -> None: - """ Adds a list item. """ - self.wrap(content, initial_indent="* ", subsequent_indent=" ") - - def add_list(self, - items: GenericContentIterable, - prologue: Optional[GenericContent] = None, - epilogue: Optional[GenericContent] = None, - add_blank_line: bool = False) -> None: - """ Adds a list with introduction. """ - if items: - self.wrap(prologue) - for item in items: - self.add_list_item(item) - if add_blank_line: - self.add_blank_line() - self.wrap(epilogue) - - def open_list_item(self, content: GenericContent) -> None: - """ Opens a list item. """ - self.add(["* "]) - self.push_indent(" ") - self.gap = True - self.paste(content) - - def close_list_item(self) -> None: - """ Closes a list item. """ - self.pop_indent() - self.gap = True - - @contextmanager - def list_item(self, content: GenericContent) -> Iterator[None]: - """ Opens a list item context. """ - self.open_list_item(content) - yield - self.close_list_item() - def add_licence_and_copyrights(self) -> None: """ Adds a licence and copyright block according to the registered licenses -- cgit v1.2.3