1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 13:41:15 +02:00

Move doc() to Args

This commit is contained in:
Eelco Dolstra 2020-12-07 13:04:24 +01:00
parent 9fab14adbc
commit 346baec783
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
2 changed files with 5 additions and 5 deletions

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;
}