diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-05-26 13:18:46 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2023-05-30 11:26:50 +0300 |
commit | 651c01a92dbbec65674fe3c73a6c82a936e73d91 (patch) | |
tree | 6a9c62f2d4756b4547c1a742a57d546db9e81b62 /mod/mod-package-version-details.cxx | |
parent | 9d3853cef802cb25ccc5c6749293d76990a3030c (diff) |
Add support for package-description, package-description-type, and changes-type package manifest values
Diffstat (limited to 'mod/mod-package-version-details.cxx')
-rw-r--r-- | mod/mod-package-version-details.cxx | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/mod/mod-package-version-details.cxx b/mod/mod-package-version-details.cxx index e47d9b4..3a8d8f4 100644 --- a/mod/mod-package-version-details.cxx +++ b/mod/mod-package-version-details.cxx @@ -189,20 +189,20 @@ handle (request& rq, response& rs) s << H2 << pkg->summary << ~H2; - if (const optional<string>& d = pkg->description) + if (const optional<typed_text>& d = pkg->package_description + ? pkg->package_description + : pkg->description) { const string id ("description"); const string what (title + " description"); s << (full ? DIV_TEXT (*d, - *pkg->description_type, true /* strip_title */, id, what, error) : DIV_TEXT (*d, - *pkg->description_type, true /* strip_title */, options_->package_description (), url (!full, id), @@ -886,19 +886,25 @@ handle (request& rq, response& rs) s << ~DIV; } - const string& ch (pkg->changes); - - if (!ch.empty ()) + if (const optional<typed_text>& c = pkg->changes) { const string id ("changes"); + const string what (title + " changes"); s << H3 << "Changes" << ~H3 << (full - ? PRE_TEXT (ch, id) - : PRE_TEXT (ch, + ? DIV_TEXT (*c, + false /* strip_title */, + id, + what, + error) + : DIV_TEXT (*c, + false /* strip_title */, options_->package_changes (), - url (!full, "changes"), - id)); + url (!full, id), + id, + what, + error)); } s << ~DIV |