Uniform output in functions and constructor NatSpec

This commit is contained in:
hrkrshnn
2020-05-04 12:39:43 +05:30
parent e306fdc251
commit aa65e9423c
4 changed files with 19 additions and 11 deletions
+5 -1
View File
@@ -42,8 +42,12 @@ Json::Value Natspec::userDocumentation(ContractDefinition const& _contractDef)
{
string value = extractDoc(constructorDefinition->annotation().docTags, "notice");
if (!value.empty())
{
// add the constructor, only if we have any documentation to add
methods["constructor"] = Json::Value(value);
Json::Value user;
user["notice"] = Json::Value(value);
methods["constructor"] = user;
}
}
string notice = extractDoc(_contractDef.annotation().docTags, "notice");