Move doc() to Args

This commit is contained in:
Eelco Dolstra
2020-12-21 13:32:23 +01:00
parent 9fab14adbc
commit 346baec783
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -254,6 +254,8 @@ nlohmann::json Args::toJSON()
res["description"] = description();
res["flags"] = std::move(flags);
res["args"] = std::move(args);
auto s = doc();
if (s != "") res.emplace("doc", stripIndentation(s));
return res;
}
@@ -378,8 +380,6 @@ nlohmann::json Command::toJSON()
auto res = Args::toJSON();
res["examples"] = std::move(exs);
auto s = doc();
if (s != "") res.emplace("doc", stripIndentation(s));
return res;
}