aboutsummaryrefslogtreecommitdiff
path: root/libbrep/package.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-05-26 13:18:46 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2023-05-30 11:26:50 +0300
commit651c01a92dbbec65674fe3c73a6c82a936e73d91 (patch)
tree6a9c62f2d4756b4547c1a742a57d546db9e81b62 /libbrep/package.cxx
parent9d3853cef802cb25ccc5c6749293d76990a3030c (diff)
Add support for package-description, package-description-type, and changes-type package manifest values
Diffstat (limited to 'libbrep/package.cxx')
-rw-r--r--libbrep/package.cxx20
1 files changed, 15 insertions, 5 deletions
diff --git a/libbrep/package.cxx b/libbrep/package.cxx
index 152d1d8..e5e7767 100644
--- a/libbrep/package.cxx
+++ b/libbrep/package.cxx
@@ -60,9 +60,9 @@ namespace brep
license_alternatives_type la,
small_vector<string, 5> tp,
small_vector<string, 5> kw,
- optional<string> ds,
- optional<text_type> dt,
- string ch,
+ optional<typed_text> ds,
+ optional<typed_text> pds,
+ optional<typed_text> ch,
optional<manifest_url> ur,
optional<manifest_url> du,
optional<manifest_url> su,
@@ -94,7 +94,7 @@ namespace brep
topics (move (tp)),
keywords (move (kw)),
description (move (ds)),
- description_type (move (dt)),
+ package_description (move (pds)),
changes (move (ch)),
url (move (ur)),
doc_url (move (du)),
@@ -216,7 +216,17 @@ namespace brep
for (const auto& k: keywords)
k2 += ' ' + k;
- return {move (k), move (k2), description ? *description : "", changes};
+ string d (description ? description->text : "");
+
+ if (package_description)
+ {
+ if (description)
+ d += ' ';
+
+ d += package_description->text;
+ }
+
+ return {move (k), move (k2), move (d), changes ? changes->text : ""};
}
// repository