Skip to content

Commit

Permalink
Fix gethelp command in CLI wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
abitmore committed Jul 12, 2023
1 parent ede3cb0 commit 311c6a2
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions libraries/wallet/generate_api_documentation.pl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <graphene/wallet/wallet.hpp>
namespace graphene { namespace wallet {
namespace detail
namespace detail
{
struct api_method_name_collector_visitor
{
Expand All @@ -29,7 +29,7 @@
}
};
}
api_documentation::api_documentation()
{
END
Expand Down Expand Up @@ -110,17 +110,26 @@ sub formatDocComment

for (my $i = 0; $i < @{$doc}; ++$i)
{
if ($doc->[$i] eq 'params')
if (($doc->[$i] eq 'params') # doxygen version 1.8.11 (Ubuntu 16.04) or 1.8.13 (Ubuntu 18.04)
or ($doc->[$i]->{params})) # doxygen version 1.8.17 (Ubuntu 20.04)
{
$paramDocs .= "Parameters:\n";
@parametersList = @{$doc->[$i + 1]};
if ($doc->[$i] eq 'params')
{
++$i;
@parametersList = @{$doc->[$i]};
}
else
{
@parametersList = @{$doc->[$i]->{params}};
}
for my $parameter (@parametersList)
{
my $declname = $parameter->{parameters}->[0]->{name};
my $decltype = cleanupDoxygenType($paramInfo->{$declname}->{type});
$paramDocs .= Text::Wrap::fill(' ', ' ', "$declname: " . formatDocComment($parameter->{doc}) . " (type: $decltype)") . "\n";
$paramDocs .= Text::Wrap::fill(' ', ' ', "$declname: " . formatDocComment($parameter->{doc})
. " (type: $decltype)") . "\n";
}
++$i;
}
elsif ($doc->[$i]->{return})
{
Expand Down Expand Up @@ -154,7 +163,7 @@ sub formatDocComment
my $result = Text::Wrap::fill('', '', $bodyDocs);
$result .= "\n\n" . $paramDocs if $paramDocs;
$result .= "\n\n" . $returnDocs if $returnDocs;

return $result;
}

Expand Down

0 comments on commit 311c6a2

Please sign in to comment.