Skip to content

Commit c4ae714

Browse files
committed
Merge bitcoin/bitcoin#23714: doc: Normalize RPC description whitespace
faa0833 doc: Normalize RPC description whitespace (MarcoFalke) Pull request description: It is tedious to manually add trailing newlines after the description so that there is an empty new line before the `Arguments` section. Fix that by adding it with C++ code. ACKs for top commit: fanquake: ACK faa0833 Tree-SHA512: 061786c7f19d767f2b7a0362b948e34d181f4cc740a60211756da29ece7554e95be39a9beec3e201eddc8da3ea7e22ac917479eae04b230bb7b0db7a9647af8c
2 parents f727d81 + faa0833 commit c4ae714

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)