aboutsummaryrefslogtreecommitdiff
path: root/load/load.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'load/load.cxx')
-rw-r--r--load/load.cxx26
1 files changed, 10 insertions, 16 deletions
diff --git a/load/load.cxx b/load/load.cxx
index 7556449..7786e0e 100644
--- a/load/load.cxx
+++ b/load/load.cxx
@@ -292,29 +292,23 @@ load_packages (const shared_ptr<repository>& rp, database& db)
optional<string> dsc;
if (pm.description)
{
- if (pm.description->file)
- {
- // @@ Pull description from the file when package manager API
- // is ready.
- }
- else
- dsc = move (*pm.description);
+ assert (!pm.description->file);
+ dsc = move (pm.description->text);
}
string chn;
for (auto& c: pm.changes)
{
- if (c.file)
- {
- // @@ Pull change notes from the file when package manager
- // API is ready.
- }
+ assert (!c.file);
+
+ if (chn.empty ())
+ chn = move (c.text);
else
{
- if (chn.empty ())
- chn = move (c);
- else
- chn += "\n" + c;
+ if (chn.back () != '\n')
+ chn += '\n'; // Always have a blank line as a separator.
+
+ chn += "\n" + c.text;
}
}