Skip to content

Commit faa0833

Browse files
author
MarcoFalke
committed
doc: Normalize RPC description whitespace
1 parent f727d81 commit faa0833

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/rpc/misc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ static RPCHelpMan deriveaddresses()
301301
static RPCHelpMan verifymessage()
302302
{
303303
return RPCHelpMan{"verifymessage",
304-
"\nVerify a signed message\n",
304+
"Verify a signed message.",
305305
{
306306
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The bitcoin address to use for the signature."},
307307
{"signature", RPCArg::Type::STR, RPCArg::Optional::NO, "The signature provided by the signer in base 64 encoding (see signmessage)."},

src/rpc/util.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,10 +620,9 @@ std::string RPCHelpMan::ToString() const
620620
ret += arg.ToString(/* oneline */ true);
621621
}
622622
if (was_optional) ret += " )";
623-
ret += "\n";
624623

625624
// Description
626-
ret += m_description;
625+
ret += "\n\n" + TrimString(m_description) + "\n";
627626

628627
// Arguments
629628
Sections sections;

test/functional/rpc_generate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ def set_test_params(self):
1717

1818
def run_test(self):
1919
message = (
20-
"generate\n"
20+
"generate\n\n"
2121
"has been replaced by the -generate "
22-
"cli option. Refer to -help for more information."
22+
"cli option. Refer to -help for more information.\n"
2323
)
2424

2525
self.log.info("Test rpc generate raises with message to use cli option")

0 commit comments

Comments
 (0)