RSS export: Make description more readable.
continuous-integration/drone/push Build is passing Details

Add HTML tags to make it look neat.
This commit is contained in:
tastytea 2019-09-21 21:46:30 +02:00
parent c9221757e6
commit 2f8dffff90
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 6 additions and 4 deletions

View File

@ -58,7 +58,6 @@ namespace remwharead
writer.endElement("", "", "title");
writer.startElement("", "", "link");
// FIXME: There has to be an URL here.
writer.endElement("", "", "link");
writer.startElement("", "", "description");
@ -115,11 +114,11 @@ namespace remwharead
string description = entry.description;
if (!description.empty())
{
description += "\n\n";
description = "<p>" + description + "</p>";
}
if (!entry.tags.empty())
{
description += "Tags: ";
description += "<p><strong>Tags:</strong> ";
for (const string &tag : entry.tags)
{
description += tag;
@ -128,10 +127,13 @@ namespace remwharead
description += ", ";
}
}
description += "</p>";
}
if (!entry.archive_uri.empty())
{
description += "\n\nArchived version: " + entry.archive_uri;
description += "<p><strong>Archived version:</strong> "
"<a href=\"" + entry.archive_uri + "\">"
+ entry.archive_uri + "</a>";
}
writer.startElement("", "", "description");
writer.characters(description);