aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-package-details.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-10-17 18:48:46 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-10-17 18:48:46 +0300
commitff96d28f969a6716cfc9ccefe94e70132bc4d6db (patch)
tree1fce38985479e9152fdbaf2348e03036ba487810 /mod/mod-package-details.cxx
parent48d4ae50d57d58c35b25d2917faad6700783ac0d (diff)
Display package description as a pre-formatted text
Diffstat (limited to 'mod/mod-package-details.cxx')
-rw-r--r--mod/mod-package-details.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/mod/mod-package-details.cxx b/mod/mod-package-details.cxx
index 68e6530..df69614 100644
--- a/mod/mod-package-details.cxx
+++ b/mod/mod-package-details.cxx
@@ -183,12 +183,17 @@ handle (request& rq, response& rs)
//
s << H2 << pkg->summary << ~H2;
- static const string id ("description");
- if (const auto& d = pkg->description)
+ if (const optional<string>& d = pkg->description)
+ {
+ const string id ("description");
+
s << (full
- ? P_DESCRIPTION (*d, id)
- : P_DESCRIPTION (*d, options_->package_description (),
- url (!full, squery, page, id)));
+ ? PRE_TEXT (*d, id)
+ : PRE_TEXT (*d,
+ options_->package_description (),
+ url (!full, squery, page, id),
+ id));
+ }
s << TABLE(CLASS="proplist", ID="package")
<< TBODY