From a2433ba34bb1ec235ccfe12610b93bc5da22a9d3 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Fri, 21 Mar 2025 10:28:48 +1300 Subject: [PATCH] cmdref: Format help_script() output as yoscrypt Or at least all of the synth commands, because they have the same preceding text. Except `synth_fabulous`, because that has unconditional `read_verilog`s at the start. Which seems like a bad idea and and not compatible with `-run`? --- kernel/register.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/register.cc b/kernel/register.cc index a853576f2..df3e1d453 100644 --- a/kernel/register.cc +++ b/kernel/register.cc @@ -974,7 +974,11 @@ struct HelpPass : public Pass { } if (!current_buffer.empty()) { - current_listing->codeblock(current_buffer, "none", null_source); + if (current_buffer.size() > 64 && current_buffer.substr(0, 64).compare("The following commands are executed by this synthesis command:\n\n") == 0) { + current_listing->paragraph(current_buffer.substr(0, 62), null_source); + current_listing->codeblock(current_buffer.substr(64), "yoscrypt", null_source); + } else + current_listing->codeblock(current_buffer, "none", null_source); current_buffer = ""; } }