From a3125ce89285b79406b72c64a148a752bf313a95 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Fri, 21 Mar 2025 10:26:11 +1300 Subject: [PATCH] cmdref: Add cmd titles Display subheadings for each command. Remove now redundant toc entry for `yosys> help ` line. --- docs/util/cmdref.py | 2 +- docs/util/newcmdref.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/util/cmdref.py b/docs/util/cmdref.py index e471ea46d..1ef09dcf7 100644 --- a/docs/util/cmdref.py +++ b/docs/util/cmdref.py @@ -33,7 +33,7 @@ class TocNode(ObjectDescription): signode['ids'].append(idx) def _object_hierarchy_parts(self, sig_node: addnodes.desc_signature) -> tuple[str, ...]: - if 'fullname' not in sig_node: + if 'tocname' not in sig_node: return () modname = sig_node.get('module') diff --git a/docs/util/newcmdref.py b/docs/util/newcmdref.py index a00df3095..e014c03e5 100644 --- a/docs/util/newcmdref.py +++ b/docs/util/newcmdref.py @@ -322,6 +322,10 @@ class YosysCmdDocumenter(YosysCmdGroupDocumenter): source_name = self.object.source_file source_line = self.object.source_line + title = f'{self.object.name} - {self.object.title}' + self.add_line(title, source_name, source_line) + self.add_line('#' * len(title), source_name, source_line) + # cmd definition self.add_line(f'.. {domain}:{directive}:: {sig}', source_name, source_line) if self.object.title: