From 7e4c92e29954c14f9c1dd51aff95fff25d3ced32 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 22 May 2019 14:15:44 +0300 Subject: Add support for package manifest upstream-version value --- mod/page.cxx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'mod/page.cxx') diff --git a/mod/page.cxx b/mod/page.cxx index 228a137..0c4c257 100644 --- a/mod/page.cxx +++ b/mod/page.cxx @@ -153,8 +153,8 @@ namespace brep if (!value_.empty ()) s << VALUE(value_); - if (!placeholder_.empty ()) - s << PLACEHOLDER(placeholder_); + if (placeholder_ != nullptr) + s << PLACEHOLDER(*placeholder_); if (autofocus_) s << AUTOFOCUS(""); @@ -249,7 +249,9 @@ namespace brep { s << version_; - if (stub_) + if (upstream_version_ != nullptr) + s << " (" << *upstream_version_ << ')'; + else if (stub_) s << " (stub)"; } else @@ -259,12 +261,13 @@ namespace brep s << A(HREF=tenant_dir (*root_, *tenant_) / dir_path (mime_url_encode (package_->string (), false)) / path (version_)) - << version_; + << version_ + << ~A; - if (stub_) + if (upstream_version_ != nullptr) + s << " (" << *upstream_version_ << ')'; + else if (stub_) s << " (stub)"; - - s << ~A; } s << ~SPAN -- cgit v1.1