From cb21eb2283b0489adf10cc6799de3be088eb3fe1 Mon Sep 17 00:00:00 2001 From: Jakob Lykke Andersen Date: Sun, 11 Apr 2021 19:55:03 +0200 Subject: [PATCH] Decl styling, handle desc_inline in manpage and texinfo --- sphinx/writers/manpage.py | 6 ++++++ sphinx/writers/texinfo.py | 28 ++++++++++++++++++++++------ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/sphinx/writers/manpage.py b/sphinx/writers/manpage.py index a43f117ae57..3f0eea5eb11 100644 --- a/sphinx/writers/manpage.py +++ b/sphinx/writers/manpage.py @@ -152,6 +152,12 @@ def visit_desc_content(self, node: Element) -> None: def depart_desc_content(self, node: Element) -> None: self.depart_definition(node) + def visit_desc_inline(self, node: Element) -> None: + pass + + def depart_desc_inline(self, node: Element) -> None: + pass + # Nodes for high-level structure in signatures ############################################## diff --git a/sphinx/writers/texinfo.py b/sphinx/writers/texinfo.py index cad6f3685b8..6df558323f9 100644 --- a/sphinx/writers/texinfo.py +++ b/sphinx/writers/texinfo.py @@ -1367,7 +1367,12 @@ def visit_acks(self, node: Element) -> None: self.body.append('\n\n') raise nodes.SkipNode - # -- Desc + ############################################################# + # Domain-specific object descriptions + ############################################################# + + # Top-level nodes for descriptions + ################################## def visit_desc(self, node: addnodes.desc) -> None: self.descs.append(node) @@ -1408,6 +1413,21 @@ def visit_desc_signature_line(self, node: Element) -> None: def depart_desc_signature_line(self, node: Element) -> None: pass + def visit_desc_content(self, node: Element) -> None: + pass + + def depart_desc_content(self, node: Element) -> None: + pass + + def visit_desc_inline(self, node: Element) -> None: + pass + + def depart_desc_inline(self, node: Element) -> None: + pass + + # Nodes for high-level structure in signatures + ############################################## + def visit_desc_name(self, node: Element) -> None: pass @@ -1470,11 +1490,7 @@ def visit_desc_annotation(self, node: Element) -> None: def depart_desc_annotation(self, node: Element) -> None: pass - def visit_desc_content(self, node: Element) -> None: - pass - - def depart_desc_content(self, node: Element) -> None: - pass + ############################################## def visit_inline(self, node: Element) -> None: pass